#from pandas_profiling import ProfileReport
import matplotlib.pyplot as mp
from collections import Counter
import math
import scipy.stats as ss
from sklearn.preprocessing import LabelEncoder
import pandas as pd
import plotly as pf
import numpy as np
#.figure_factory as ff
import seaborn as sns
import plotly.express as px
from collections import Counter
import plotly.graph_objects as go
import plotly.figure_factory as ff
from plotly.subplots import make_subplots
from plotly.offline import iplot, init_notebook_mode,plot
init_notebook_mode()
from urllib.request import urlopen
import json
from plotly.colors import n_colors
cm = sns.light_palette("green", as_cmap=True)
with open('geoson-counties-fips.json') as json_:#urlopen('https://raw.githubusercontent.com/plotly/datasets/master/geojson-counties-fips.json') as response:
counties = json.load(json_)
/Users/abhinavgairola/miniconda3/envs/raven_libraries/lib/python3.7/site-packages/xarray/core/merge.py:17: FutureWarning: The Panel class is removed from pandas. Accessing it from the top-level namespace will also be removed in the next version PANDAS_TYPES = (pd.Series, pd.DataFrame, pd.Panel)
def plotter(type_of_plot,dataframe,R,G,B,*args):
""" Enter the type of plot needed and the keys and the color
@In, type of plot needed
@In, dataframe
@In, R G B color code
@In, keys
"""
if type_of_plot == 'line':
fig_ = go.Figure()
#fig = go.Figure()
key_1, key_2 = args
fig_.add_trace(go.Scatter(x=dataframe[key_1], y=dataframe[key_2],
line=dict(color='rgb('+str(R)+','+str(G)+','+str(B)+')', width=4)))
fig_.update_layout(template="ggplot2")
#fig_.show()
if type_of_plot == 'bar':
key_1,key_2,key_3 = args
fig_ = px.bar(dataframe,x=key_1, y=key_2,color=key_3,height=800,width=1000,orientation='v')
fig_.update_layout(template="ggplot2")
if type_of_plot == 'density':
hist_data, group_labels,bins = args
fig_ = ff.create_distplot(hist_data,group_labels,bin_size=bins,show_rug=False)
fig_.update_layout(template="ggplot2")
if type_of_plot == 'scatter_matrix':
h1, w1=args
fig_ = px.scatter_matrix(dataframe,height=h1,width=w1)
fig_.update_layout(template="ggplot2")
if type_of_plot == 'pie':
key_1, key_2, title_ = args
fig_ = px.pie(dataframe, values=key_1, names=key_2, title=title_)
fig_.update_layout(template="ggplot2")
if type_of_plot == 'donut_pie':
values, labels = args
fig_ = go.Figure(data=[go.Pie(labels=labels, values=values,hole=.3)])
fig_.update_layout(template="ggplot2")
if type_of_plot == 'histogram':
key_1, key_2 = args
fig_ = px.histogram(dataframe, x=key_1, color=key_2,nbins=100)#, barmode="overlay")
fig_.update_layout(template="ggplot2")
if type_of_plot == 'scatter_':
key_1,key_2,key_3,key_4 = args
fig_ = px.scatter(dataframe, x=key_1, y=key_2,size=key_3,color=key_4, log_x=True, size_max=60)
fig_.update_layout(template="ggplot2")
if type_of_plot == 'violin':
key_y,key_x,key_color=args
fig_ = px.violin(dataframe, y=dataframe[key_y], x=dataframe[key_x], color=dataframe[key_color], box=True
)#hover_data=dataframe.columns)
if type_of_plot == 'bar_h':
key_1,key_2,key_3 = args
fig_ = px.bar(dataframe,x=key_1, y=key_2,color=key_3,height=800,width=1000,orientation='h')
fig_.update_layout(template="ggplot2")
return fig_
def conditional_entropy(x,y):
""" computes entropy of x given y """
y_counter = Counter(y)
xy_counter = Counter(list(zip(x,y)))
total_occurrences = sum(y_counter.values())
entropy = 0
for xy in xy_counter.keys():
p_xy = xy_counter[xy] / total_occurrences
p_y = y_counter[xy[1]] / total_occurrences
entropy += p_xy * math.log(p_y/p_xy)
return entropy
def theil_u(x,y):
"""" These methods are taken from a medium post by Shaked Zychlinski"""
s_xy = conditional_entropy(x,y)
x_counter = Counter(x)
total_occurrences = sum(x_counter.values())
p_x = list(map(lambda n: n/total_occurrences, x_counter.values()))
s_x = ss.entropy(p_x)
if s_x == 0:
return 1
else:
return (s_x - s_xy) / s_x
def cramers_v(x, y):
"""Compute Cramers V correlation"""
confusion_matrix = pd.crosstab(x,y)
chi2 = ss.chi2_contingency(confusion_matrix)[0]
n = confusion_matrix.sum().sum()
phi2 = chi2/n
r,k = confusion_matrix.shape
phi2corr = max(0, phi2-((k-1)*(r-1))/(n-1))
rcorr = r-((r-1)**2)/(n-1)
kcorr = k-((k-1)**2)/(n-1)
return np.sqrt(phi2corr/min((kcorr-1),(rcorr-1)))
def additive_smoothing(df, by, on, m):
""" computes additive smoothing or Laplace smoothing
@In, dataframe
@In, by--feature to groupby
@In, on-- target feature
@In , m-- weight to be given to the global mean
@Out, Laplace smoothed means
"""
global_mean_target = df[on].mean()
# Compute the number of values and the mean of each group
agg = df.groupby(by)[on].agg(['count', 'mean'])
counts = agg['count']
means = agg['mean']
# Compute the "smoothed" means
smooth = (counts * means + m * global_mean_target) / (counts + m)
return smooth#df[by].map(smooth)
chunks = pd.read_csv('Data/Lending_Club.csv',chunksize=100000,low_memory=False)
df = pd.concat(chunks)
## explore the keys of the data
key = df.keys()
list(key)
['id', 'member_id', 'loan_amnt', 'funded_amnt', 'funded_amnt_inv', 'term', 'int_rate', 'installment', 'grade', 'sub_grade', 'emp_title', 'emp_length', 'home_ownership', 'annual_inc', 'verification_status', 'issue_d', 'loan_status', 'pymnt_plan', 'url', 'desc', 'purpose', 'title', 'zip_code', 'addr_state', 'dti', 'delinq_2yrs', 'earliest_cr_line', 'fico_range_low', 'fico_range_high', 'inq_last_6mths', 'mths_since_last_delinq', 'mths_since_last_record', 'open_acc', 'pub_rec', 'revol_bal', 'revol_util', 'total_acc', 'initial_list_status', 'out_prncp', 'out_prncp_inv', 'total_pymnt', 'total_pymnt_inv', 'total_rec_prncp', 'total_rec_int', 'total_rec_late_fee', 'recoveries', 'collection_recovery_fee', 'last_pymnt_d', 'last_pymnt_amnt', 'next_pymnt_d', 'last_credit_pull_d', 'last_fico_range_high', 'last_fico_range_low', 'collections_12_mths_ex_med', 'mths_since_last_major_derog', 'policy_code', 'application_type', 'annual_inc_joint', 'dti_joint', 'verification_status_joint', 'acc_now_delinq', 'tot_coll_amt', 'tot_cur_bal', 'open_acc_6m', 'open_act_il', 'open_il_12m', 'open_il_24m', 'mths_since_rcnt_il', 'total_bal_il', 'il_util', 'open_rv_12m', 'open_rv_24m', 'max_bal_bc', 'all_util', 'total_rev_hi_lim', 'inq_fi', 'total_cu_tl', 'inq_last_12m', 'acc_open_past_24mths', 'avg_cur_bal', 'bc_open_to_buy', 'bc_util', 'chargeoff_within_12_mths', 'delinq_amnt', 'mo_sin_old_il_acct', 'mo_sin_old_rev_tl_op', 'mo_sin_rcnt_rev_tl_op', 'mo_sin_rcnt_tl', 'mort_acc', 'mths_since_recent_bc', 'mths_since_recent_bc_dlq', 'mths_since_recent_inq', 'mths_since_recent_revol_delinq', 'num_accts_ever_120_pd', 'num_actv_bc_tl', 'num_actv_rev_tl', 'num_bc_sats', 'num_bc_tl', 'num_il_tl', 'num_op_rev_tl', 'num_rev_accts', 'num_rev_tl_bal_gt_0', 'num_sats', 'num_tl_120dpd_2m', 'num_tl_30dpd', 'num_tl_90g_dpd_24m', 'num_tl_op_past_12m', 'pct_tl_nvr_dlq', 'percent_bc_gt_75', 'pub_rec_bankruptcies', 'tax_liens', 'tot_hi_cred_lim', 'total_bal_ex_mort', 'total_bc_limit', 'total_il_high_credit_limit', 'revol_bal_joint', 'sec_app_fico_range_low', 'sec_app_fico_range_high', 'sec_app_earliest_cr_line', 'sec_app_inq_last_6mths', 'sec_app_mort_acc', 'sec_app_open_acc', 'sec_app_revol_util', 'sec_app_open_act_il', 'sec_app_num_rev_accts', 'sec_app_chargeoff_within_12_mths', 'sec_app_collections_12_mths_ex_med', 'sec_app_mths_since_last_major_derog', 'hardship_flag', 'hardship_type', 'hardship_reason', 'hardship_status', 'deferral_term', 'hardship_amount', 'hardship_start_date', 'hardship_end_date', 'payment_plan_start_date', 'hardship_length', 'hardship_dpd', 'hardship_loan_status', 'orig_projected_additional_accrued_interest', 'hardship_payoff_balance_amount', 'hardship_last_payment_amount', 'disbursement_method', 'debt_settlement_flag', 'debt_settlement_flag_date', 'settlement_status', 'settlement_date', 'settlement_amount', 'settlement_percentage', 'settlement_term']
df.describe().style.set_properties(**{'background-color': 'black',
'color': 'lawngreen',
'border-color': 'white'})
## Checking the description
| member_id | loan_amnt | funded_amnt | funded_amnt_inv | int_rate | installment | annual_inc | dti | delinq_2yrs | fico_range_low | fico_range_high | inq_last_6mths | mths_since_last_delinq | mths_since_last_record | open_acc | pub_rec | revol_bal | revol_util | total_acc | out_prncp | out_prncp_inv | total_pymnt | total_pymnt_inv | total_rec_prncp | total_rec_int | total_rec_late_fee | recoveries | collection_recovery_fee | last_pymnt_amnt | last_fico_range_high | last_fico_range_low | collections_12_mths_ex_med | mths_since_last_major_derog | policy_code | annual_inc_joint | dti_joint | acc_now_delinq | tot_coll_amt | tot_cur_bal | open_acc_6m | open_act_il | open_il_12m | open_il_24m | mths_since_rcnt_il | total_bal_il | il_util | open_rv_12m | open_rv_24m | max_bal_bc | all_util | total_rev_hi_lim | inq_fi | total_cu_tl | inq_last_12m | acc_open_past_24mths | avg_cur_bal | bc_open_to_buy | bc_util | chargeoff_within_12_mths | delinq_amnt | mo_sin_old_il_acct | mo_sin_old_rev_tl_op | mo_sin_rcnt_rev_tl_op | mo_sin_rcnt_tl | mort_acc | mths_since_recent_bc | mths_since_recent_bc_dlq | mths_since_recent_inq | mths_since_recent_revol_delinq | num_accts_ever_120_pd | num_actv_bc_tl | num_actv_rev_tl | num_bc_sats | num_bc_tl | num_il_tl | num_op_rev_tl | num_rev_accts | num_rev_tl_bal_gt_0 | num_sats | num_tl_120dpd_2m | num_tl_30dpd | num_tl_90g_dpd_24m | num_tl_op_past_12m | pct_tl_nvr_dlq | percent_bc_gt_75 | pub_rec_bankruptcies | tax_liens | tot_hi_cred_lim | total_bal_ex_mort | total_bc_limit | total_il_high_credit_limit | revol_bal_joint | sec_app_fico_range_low | sec_app_fico_range_high | sec_app_inq_last_6mths | sec_app_mort_acc | sec_app_open_acc | sec_app_revol_util | sec_app_open_act_il | sec_app_num_rev_accts | sec_app_chargeoff_within_12_mths | sec_app_collections_12_mths_ex_med | sec_app_mths_since_last_major_derog | deferral_term | hardship_amount | hardship_length | hardship_dpd | orig_projected_additional_accrued_interest | hardship_payoff_balance_amount | hardship_last_payment_amount | settlement_amount | settlement_percentage | settlement_term | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| count | 0.000000 | 2260668.000000 | 2260668.000000 | 2260668.000000 | 2260668.000000 | 2260668.000000 | 2260664.000000 | 2258957.000000 | 2260639.000000 | 2260668.000000 | 2260668.000000 | 2260638.000000 | 1102166.000000 | 359156.000000 | 2260639.000000 | 2260639.000000 | 2260668.000000 | 2258866.000000 | 2260639.000000 | 2260668.000000 | 2260668.000000 | 2260668.000000 | 2260668.000000 | 2260668.000000 | 2260668.000000 | 2260668.000000 | 2260668.000000 | 2260668.000000 | 2260668.000000 | 2260668.000000 | 2260668.000000 | 2260523.000000 | 580775.000000 | 2260668.000000 | 120710.000000 | 120706.000000 | 2260639.000000 | 2190392.000000 | 2190392.000000 | 1394538.000000 | 1394539.000000 | 1394539.000000 | 1394539.000000 | 1350744.000000 | 1394539.000000 | 1191818.000000 | 1394539.000000 | 1394539.000000 | 1394539.000000 | 1394320.000000 | 2190392.000000 | 1394539.000000 | 1394538.000000 | 1394538.000000 | 2210638.000000 | 2190322.000000 | 2185733.000000 | 2184597.000000 | 2260523.000000 | 2260639.000000 | 2121597.000000 | 2190391.000000 | 2190391.000000 | 2190392.000000 | 2210638.000000 | 2187256.000000 | 519701.000000 | 1965233.000000 | 740359.000000 | 2190392.000000 | 2190392.000000 | 2190392.000000 | 2202078.000000 | 2190392.000000 | 2190392.000000 | 2190392.000000 | 2190391.000000 | 2190392.000000 | 2202078.000000 | 2107011.000000 | 2190392.000000 | 2190392.000000 | 2190392.000000 | 2190237.000000 | 2185289.000000 | 2259303.000000 | 2260563.000000 | 2190392.000000 | 2210638.000000 | 2210638.000000 | 2190392.000000 | 108020.000000 | 108021.000000 | 108021.000000 | 108021.000000 | 108021.000000 | 108021.000000 | 106184.000000 | 108021.000000 | 108021.000000 | 108021.000000 | 108021.000000 | 35942.000000 | 10917.000000 | 10917.000000 | 10917.000000 | 10917.000000 | 8651.000000 | 10917.000000 | 10917.000000 | 34246.000000 | 34246.000000 | 34246.000000 |
| mean | nan | 15046.931228 | 15041.664057 | 15023.437745 | 13.092829 | 445.806823 | 77992.428687 | 18.824196 | 0.306879 | 698.588205 | 702.588400 | 0.576835 | 34.540916 | 72.312842 | 11.612402 | 0.197528 | 16658.458078 | 50.337696 | 24.162552 | 4206.891439 | 4205.965357 | 12082.556829 | 12064.394655 | 9505.771588 | 2431.387654 | 1.518453 | 143.879135 | 23.982566 | 3429.345942 | 687.660995 | 675.539730 | 0.018146 | 44.164220 | 1.000000 | 123624.636701 | 19.251817 | 0.004148 | 232.731739 | 142492.195202 | 0.934420 | 2.779407 | 0.676431 | 1.562752 | 21.222357 | 35506.645268 | 69.140980 | 1.290133 | 2.749923 | 5806.392905 | 57.032295 | 34573.942769 | 1.012867 | 1.477304 | 2.036667 | 4.521656 | 13547.797509 | 11394.262688 | 57.899948 | 0.008464 | 12.369828 | 125.737761 | 181.491567 | 14.024089 | 8.297469 | 1.555382 | 24.844851 | 39.303090 | 7.024194 | 35.782223 | 0.500208 | 3.676069 | 5.629468 | 4.774183 | 7.726402 | 8.413439 | 8.246523 | 14.004630 | 5.577951 | 11.628130 | 0.000637 | 0.002814 | 0.082938 | 2.076755 | 94.114576 | 42.435127 | 0.128194 | 0.046771 | 178242.753744 | 51022.938462 | 23193.768173 | 43732.013476 | 33617.278847 | 669.755603 | 673.755631 | 0.633256 | 1.538997 | 11.469455 | 58.169101 | 3.010554 | 12.533072 | 0.046352 | 0.077568 | 36.937928 | 3.000000 | 155.045981 | 3.000000 | 13.743886 | 454.798089 | 11636.883942 | 193.994321 | 5010.664267 | 47.780365 | 13.191322 |
| std | nan | 9190.245488 | 9188.413022 | 9192.331679 | 4.832138 | 267.173535 | 112696.199574 | 14.183329 | 0.867230 | 33.010376 | 33.011245 | 0.885963 | 21.900471 | 26.464094 | 5.640861 | 0.570515 | 22948.305028 | 24.713073 | 11.987528 | 7343.238522 | 7342.332972 | 9901.383185 | 9896.991745 | 8321.852079 | 2679.737840 | 11.841592 | 748.164005 | 131.225587 | 6018.247582 | 72.970435 | 111.097626 | 0.150813 | 21.533121 | 0.000000 | 74161.346328 | 7.822086 | 0.069617 | 8518.461819 | 160692.640617 | 1.140700 | 3.000784 | 0.925635 | 1.578672 | 26.049187 | 44097.455925 | 23.748386 | 1.506827 | 2.596911 | 5690.561012 | 20.904748 | 36728.495448 | 1.489456 | 2.672991 | 2.383117 | 3.164229 | 16474.075010 | 16599.534400 | 28.583475 | 0.104810 | 726.464781 | 53.382175 | 97.118454 | 17.533083 | 9.208557 | 1.904981 | 32.319253 | 22.617689 | 5.965411 | 22.307239 | 1.350326 | 2.324646 | 3.382874 | 3.037921 | 4.701430 | 7.359114 | 4.683928 | 8.038868 | 3.293434 | 5.644027 | 0.027106 | 0.056165 | 0.493573 | 1.830711 | 9.036140 | 36.216157 | 0.364613 | 0.377534 | 181574.814655 | 49911.235666 | 23006.558239 | 45072.982192 | 28153.874309 | 44.729163 | 44.729272 | 0.993401 | 1.760569 | 6.627271 | 25.548212 | 3.275893 | 8.150964 | 0.411496 | 0.407996 | 23.924584 | 0.000000 | 129.040594 | 0.000000 | 9.671178 | 375.385500 | 7625.988281 | 198.629496 | 3693.122590 | 7.311822 | 8.159980 |
| min | nan | 500.000000 | 500.000000 | 0.000000 | 5.310000 | 4.930000 | 0.000000 | -1.000000 | 0.000000 | 610.000000 | 614.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 1.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | -0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 1.000000 | 5693.510000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 1.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 540.000000 | 544.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 3.000000 | 0.640000 | 3.000000 | 0.000000 | 1.920000 | 55.730000 | 0.010000 | 44.210000 | 0.200000 | 0.000000 |
| 25% | nan | 8000.000000 | 8000.000000 | 8000.000000 | 9.490000 | 251.650000 | 46000.000000 | 11.890000 | 0.000000 | 675.000000 | 679.000000 | 0.000000 | 16.000000 | 55.000000 | 8.000000 | 0.000000 | 5950.000000 | 31.500000 | 15.000000 | 0.000000 | 0.000000 | 4546.457500 | 4531.800000 | 3000.000000 | 728.187500 | 0.000000 | 0.000000 | 0.000000 | 310.330000 | 654.000000 | 650.000000 | 0.000000 | 27.000000 | 1.000000 | 83400.000000 | 13.530000 | 0.000000 | 0.000000 | 29092.000000 | 0.000000 | 1.000000 | 0.000000 | 0.000000 | 7.000000 | 8695.000000 | 55.000000 | 0.000000 | 1.000000 | 2284.000000 | 43.000000 | 14700.000000 | 0.000000 | 0.000000 | 0.000000 | 2.000000 | 3080.000000 | 1722.000000 | 35.400000 | 0.000000 | 0.000000 | 96.000000 | 116.000000 | 4.000000 | 3.000000 | 0.000000 | 6.000000 | 21.000000 | 2.000000 | 17.000000 | 0.000000 | 2.000000 | 3.000000 | 3.000000 | 4.000000 | 3.000000 | 5.000000 | 8.000000 | 3.000000 | 8.000000 | 0.000000 | 0.000000 | 0.000000 | 1.000000 | 91.300000 | 0.000000 | 0.000000 | 0.000000 | 50731.000000 | 20892.000000 | 8300.000000 | 15000.000000 | 15106.750000 | 645.000000 | 649.000000 | 0.000000 | 0.000000 | 7.000000 | 39.800000 | 1.000000 | 7.000000 | 0.000000 | 0.000000 | 16.000000 | 3.000000 | 59.440000 | 3.000000 | 5.000000 | 175.230000 | 5627.000000 | 44.440000 | 2208.000000 | 45.000000 | 6.000000 |
| 50% | nan | 12900.000000 | 12875.000000 | 12800.000000 | 12.620000 | 377.990000 | 65000.000000 | 17.840000 | 0.000000 | 690.000000 | 694.000000 | 0.000000 | 31.000000 | 74.000000 | 11.000000 | 0.000000 | 11324.000000 | 50.300000 | 22.000000 | 0.000000 | 0.000000 | 9329.720000 | 9309.675000 | 7000.000000 | 1525.940000 | 0.000000 | 0.000000 | 0.000000 | 600.570000 | 699.000000 | 695.000000 | 0.000000 | 44.000000 | 1.000000 | 110000.000000 | 18.840000 | 0.000000 | 0.000000 | 79240.000000 | 1.000000 | 2.000000 | 0.000000 | 1.000000 | 13.000000 | 23127.000000 | 72.000000 | 1.000000 | 2.000000 | 4413.000000 | 58.000000 | 25400.000000 | 1.000000 | 0.000000 | 1.000000 | 4.000000 | 7335.000000 | 5442.000000 | 60.200000 | 0.000000 | 0.000000 | 130.000000 | 164.000000 | 8.000000 | 6.000000 | 1.000000 | 14.000000 | 37.000000 | 5.000000 | 33.000000 | 0.000000 | 3.000000 | 5.000000 | 4.000000 | 7.000000 | 6.000000 | 7.000000 | 12.000000 | 5.000000 | 11.000000 | 0.000000 | 0.000000 | 0.000000 | 2.000000 | 100.000000 | 37.500000 | 0.000000 | 0.000000 | 114298.500000 | 37864.000000 | 16300.000000 | 32696.000000 | 26516.500000 | 670.000000 | 674.000000 | 0.000000 | 1.000000 | 10.000000 | 60.200000 | 2.000000 | 11.000000 | 0.000000 | 0.000000 | 36.000000 | 3.000000 | 119.140000 | 3.000000 | 15.000000 | 352.770000 | 10028.390000 | 133.160000 | 4146.110000 | 45.000000 | 14.000000 |
| 75% | nan | 20000.000000 | 20000.000000 | 20000.000000 | 15.990000 | 593.320000 | 93000.000000 | 24.490000 | 0.000000 | 715.000000 | 719.000000 | 1.000000 | 50.000000 | 92.000000 | 14.000000 | 0.000000 | 20246.000000 | 69.400000 | 31.000000 | 6149.940000 | 6146.310000 | 16940.869373 | 16916.705000 | 13899.100000 | 3108.062500 | 0.000000 | 0.000000 | 0.000000 | 3743.750000 | 734.000000 | 730.000000 | 0.000000 | 62.000000 | 1.000000 | 147995.000000 | 24.620000 | 0.000000 | 0.000000 | 213204.000000 | 1.000000 | 3.000000 | 1.000000 | 2.000000 | 24.000000 | 46095.000000 | 86.000000 | 2.000000 | 4.000000 | 7598.000000 | 72.000000 | 43200.000000 | 1.000000 | 2.000000 | 3.000000 | 6.000000 | 18783.000000 | 14187.000000 | 83.100000 | 0.000000 | 0.000000 | 154.000000 | 232.000000 | 17.000000 | 11.000000 | 3.000000 | 30.000000 | 57.000000 | 11.000000 | 51.000000 | 0.000000 | 5.000000 | 7.000000 | 6.000000 | 10.000000 | 11.000000 | 10.000000 | 18.000000 | 7.000000 | 14.000000 | 0.000000 | 0.000000 | 0.000000 | 3.000000 | 100.000000 | 71.400000 | 0.000000 | 0.000000 | 257755.000000 | 64350.000000 | 30300.000000 | 58804.250000 | 43769.000000 | 695.000000 | 699.000000 | 1.000000 | 2.000000 | 15.000000 | 78.600000 | 4.000000 | 17.000000 | 0.000000 | 0.000000 | 56.000000 | 3.000000 | 213.260000 | 3.000000 | 22.000000 | 620.175000 | 16151.890000 | 284.190000 | 6850.172500 | 50.000000 | 18.000000 |
| max | nan | 40000.000000 | 40000.000000 | 40000.000000 | 30.990000 | 1719.830000 | 110000000.000000 | 999.000000 | 58.000000 | 845.000000 | 850.000000 | 33.000000 | 226.000000 | 129.000000 | 101.000000 | 86.000000 | 2904836.000000 | 892.300000 | 176.000000 | 40000.000000 | 40000.000000 | 63296.877917 | 63296.880000 | 40000.000000 | 28192.500000 | 1484.340000 | 39859.550000 | 7174.719000 | 42192.050000 | 850.000000 | 845.000000 | 20.000000 | 226.000000 | 1.000000 | 7874821.000000 | 69.490000 | 14.000000 | 9152545.000000 | 9971659.000000 | 18.000000 | 57.000000 | 25.000000 | 51.000000 | 511.000000 | 1837038.000000 | 1000.000000 | 28.000000 | 60.000000 | 1170668.000000 | 239.000000 | 9999999.000000 | 48.000000 | 111.000000 | 67.000000 | 64.000000 | 958084.000000 | 711140.000000 | 339.600000 | 10.000000 | 249925.000000 | 999.000000 | 999.000000 | 547.000000 | 382.000000 | 94.000000 | 661.000000 | 202.000000 | 25.000000 | 202.000000 | 58.000000 | 50.000000 | 72.000000 | 71.000000 | 86.000000 | 159.000000 | 91.000000 | 151.000000 | 65.000000 | 101.000000 | 7.000000 | 4.000000 | 58.000000 | 32.000000 | 100.000000 | 100.000000 | 12.000000 | 85.000000 | 9999999.000000 | 3408095.000000 | 1569000.000000 | 2118996.000000 | 1110019.000000 | 845.000000 | 850.000000 | 6.000000 | 27.000000 | 82.000000 | 434.300000 | 43.000000 | 106.000000 | 21.000000 | 23.000000 | 185.000000 | 3.000000 | 943.940000 | 3.000000 | 37.000000 | 2680.890000 | 40306.410000 | 1407.860000 | 33601.000000 | 521.350000 | 181.000000 |
Data_types_counts = (df.dtypes.value_counts().sort_values())
## Checking the data types
Data_types_counts
object 38 float64 113 dtype: int64
vals=Data_types_counts.values
vals[0]
38
Data_type_counts_frame = pd.DataFrame(data={'Object':[vals[0]],'Float':[vals[1]]})
Data_type_counts_frame = Data_type_counts_frame.melt(var_name=['Data-Type'],value_vars=['Object','Float'])
figure_data_type = plotter('bar',Data_type_counts_frame,0,0,0,'Data-Type','value','value')#plotter('donut_pie',df_emp,0,0,0,list(df_emp['fico_range_high'].values),list(df_emp['index'].values))
#plot(figure_fico,show_link=True,filename='plot_fico_high.html')
figure_data_type.show()
df_inter = df.isna().mean()
df_inter.sort_values()
#keys = list(df_inter.keys())
#df_inter
#idx_key = list(df_inter.keys())
#keys = [i for i in idx_key if df_inter[i] >=0.99]
id 0.000000
fico_range_high 0.000015
hardship_flag 0.000015
revol_bal 0.000015
initial_list_status 0.000015
...
hardship_reason 0.995171
hardship_dpd 0.995171
hardship_loan_status 0.995171
orig_projected_additional_accrued_interest 0.996173
member_id 1.000000
Length: 151, dtype: float64
idx_key = list(df_inter.keys())
idx_key
df_2 = df.copy()
df_2.drop((i for i in idx_key if df_inter[i] == 1.0), axis=1, inplace =True)
df_2.reset_index(drop=True,inplace=True)
df_2.isna().mean()
id 0.000000
loan_amnt 0.000015
funded_amnt 0.000015
funded_amnt_inv 0.000015
term 0.000015
...
settlement_status 0.984852
settlement_date 0.984852
settlement_amount 0.984852
settlement_percentage 0.984852
settlement_term 0.984852
Length: 150, dtype: float64
Object_data = df_2.select_dtypes(include=['object'])
float_data = df_2.select_dtypes(include = ['float64'])
## Separate the object and float data types
#dicti = list(df_2['loan_status'].unique())
#print(dicti)
#Entry = 0
#Entry = 1
#convertor = {j:i for i,j in enumerate(dicti) if type(j) == str}
#convertor
df_3 = pd.DataFrame(df_2['grade'].value_counts().sort_index())
df_3.reset_index(level=0, inplace=True)
figure_grade = plotter('donut_pie',df_3,0,0,0,list(df_3['grade'].values),list(df_3['index'].values))
#plot(figure_grade,show_link=True,filename='plot_grade.html')
figure_grade.show()
#bar chart
df_home = pd.DataFrame(df_2['home_ownership'].value_counts().sort_index())
df_home.reset_index(level=0, inplace=True)
df_home.style.set_properties(**{'background-color': 'black',
'color': 'lawngreen',
'border-color': 'white'})
| index | home_ownership | |
|---|---|---|
| 0 | ANY | 996 |
| 1 | MORTGAGE | 1111450 |
| 2 | NONE | 54 |
| 3 | OTHER | 182 |
| 4 | OWN | 253057 |
| 5 | RENT | 894929 |
figure_home = plotter('donut_pie',df_home,0,0,0,list(df_home['home_ownership'].values),list(df_home['index'].values))
#plot(figure_home,show_link=True,filename='plot_home.html')
figure_home.show()
df_emp = pd.DataFrame(df_2['fico_range_high'].value_counts().sort_index())
df_emp.reset_index(level=0, inplace=True)
df_emp = df_emp.rename(columns={'index':'Fico_Score_high','fico_range_high':'Counts'})
#df_emp
figure_fico = plotter('bar',df_emp,0,0,0,'Fico_Score_high','Counts','Counts')#plotter('donut_pie',df_emp,0,0,0,list(df_emp['fico_range_high'].values),list(df_emp['index'].values))
#plot(figure_fico,show_link=True,filename='plot_fico_high.html')
figure_fico.show()
df_emp_ = pd.DataFrame(df_2['fico_range_low'].value_counts().sort_index())
df_emp_.reset_index(level=0, inplace=True)
df_emp_ = df_emp_.rename(columns={'index':'Fico_Score_Low','fico_range_low':'Counts'})
#df_emp_.keys()
figure_emp_ = plotter('bar',df_emp_,0,0,0,'Fico_Score_Low','Counts','Counts')#plotter('donut_pie',df_emp_,0,0,0,list(df_emp_['fico_range_low'].values),list(df_emp_['index'].values))
#plot(figure_emp_,show_link=True,filename='plot_fico_high.html')
figure_emp_.show()
#distribution
df_loan = pd.DataFrame(df_2['loan_status'].value_counts().sort_index())
df_loan.reset_index(level=0, inplace=True)
df_loan = df_loan.rename(columns={'index':'Loan_status','loan_status':'Counts'})
df_loan = df_loan.sort_values(by=['Counts'],ascending=False)
figure_loan = plotter('bar',df_loan,0,0,0,'Loan_status','Counts','Counts')#plotter('donut_pie',df_loan,0,0,0,list(df_loan['loan_status'].values),list(df_loan['index'].values))
#plot(figure_loan,show_link=True,filename='plot_loan_status.html')
figure_loan.show()
df_emp_title = pd.DataFrame(df_2['emp_length'].value_counts().sort_index())
df_emp_title.reset_index(level=0, inplace=True)
df_emp_title = df_emp_title.rename(columns={'index':'Employment_Length','emp_length':'Counts'})
df_emp_title = df_emp_title.sort_values(by=['Counts'],ascending=False)
figure_length = plotter('bar',df_emp_title,0,0,0,'Employment_Length','Counts','Counts')#plotter('donut_pie',df_emp_title,0,0,0,list(df_emp_title['emp_length'].values),list(df_emp_title['index'].values))
#plot(figure_length,show_link=True,filename='plot_loan_status.html')
figure_length.show()
#employment length
df_groupby_emp = df_2.groupby(['emp_length']).mean()
#df_groupby_fico_range_low = df_2.groupby('fico_range_low').first()
df_groupby_emp.reset_index(level=0, inplace=True)
#df_groupby_fico_range_low.reset_index(level=0, inplace=True)
figure_scatter_group_emp = plotter('scatter_',df_groupby_emp,0,0,0,'loan_amnt','installment','int_rate','emp_length')#px.scatter(purpose, x="loan_amnt", y="int_rate",
#size="installment",color='purpose', log_x=True, size_max=100)
figure_scatter_group_emp.show()
df_groupby_grade_2 = df_2.groupby('grade').mean()
df_groupby_grade_2.reset_index(level=0, inplace=True)
df_groupby_grade_2.style.set_properties(**{'background-color': 'black',
'color': 'lawngreen',
'border-color': 'white'})
| grade | loan_amnt | funded_amnt | funded_amnt_inv | int_rate | installment | annual_inc | dti | delinq_2yrs | fico_range_low | fico_range_high | inq_last_6mths | mths_since_last_delinq | mths_since_last_record | open_acc | pub_rec | revol_bal | revol_util | total_acc | out_prncp | out_prncp_inv | total_pymnt | total_pymnt_inv | total_rec_prncp | total_rec_int | total_rec_late_fee | recoveries | collection_recovery_fee | last_pymnt_amnt | last_fico_range_high | last_fico_range_low | collections_12_mths_ex_med | mths_since_last_major_derog | policy_code | annual_inc_joint | dti_joint | acc_now_delinq | tot_coll_amt | tot_cur_bal | open_acc_6m | open_act_il | open_il_12m | open_il_24m | mths_since_rcnt_il | total_bal_il | il_util | open_rv_12m | open_rv_24m | max_bal_bc | all_util | total_rev_hi_lim | inq_fi | total_cu_tl | inq_last_12m | acc_open_past_24mths | avg_cur_bal | bc_open_to_buy | bc_util | chargeoff_within_12_mths | delinq_amnt | mo_sin_old_il_acct | mo_sin_old_rev_tl_op | mo_sin_rcnt_rev_tl_op | mo_sin_rcnt_tl | mort_acc | mths_since_recent_bc | mths_since_recent_bc_dlq | mths_since_recent_inq | mths_since_recent_revol_delinq | num_accts_ever_120_pd | num_actv_bc_tl | num_actv_rev_tl | num_bc_sats | num_bc_tl | num_il_tl | num_op_rev_tl | num_rev_accts | num_rev_tl_bal_gt_0 | num_sats | num_tl_120dpd_2m | num_tl_30dpd | num_tl_90g_dpd_24m | num_tl_op_past_12m | pct_tl_nvr_dlq | percent_bc_gt_75 | pub_rec_bankruptcies | tax_liens | tot_hi_cred_lim | total_bal_ex_mort | total_bc_limit | total_il_high_credit_limit | revol_bal_joint | sec_app_fico_range_low | sec_app_fico_range_high | sec_app_inq_last_6mths | sec_app_mort_acc | sec_app_open_acc | sec_app_revol_util | sec_app_open_act_il | sec_app_num_rev_accts | sec_app_chargeoff_within_12_mths | sec_app_collections_12_mths_ex_med | sec_app_mths_since_last_major_derog | deferral_term | hardship_amount | hardship_length | hardship_dpd | orig_projected_additional_accrued_interest | hardship_payoff_balance_amount | hardship_last_payment_amount | settlement_amount | settlement_percentage | settlement_term | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | A | 14603.343210 | 14598.002723 | 14587.744268 | 7.084545 | 437.846530 | 89902.403133 | 16.238648 | 0.173167 | 728.992326 | 732.993079 | 0.349509 | 37.461119 | 77.243769 | 11.932291 | 0.106603 | 18260.623192 | 37.064114 | 25.274329 | 4624.833909 | 4624.271828 | 10804.826362 | 10794.378611 | 9707.794950 | 1069.924208 | 0.482386 | 26.624803 | 4.448981 | 2850.310483 | 733.007087 | 727.342741 | 0.009640 | 46.767483 | 1.000000 | 141466.084298 | 16.630310 | 0.001346 | 127.522056 | 173241.203730 | 0.736457 | 2.678679 | 0.498440 | 1.280294 | 23.697416 | 34005.508613 | 63.262498 | 1.026317 | 2.239798 | 6487.369003 | 45.512661 | 49747.577932 | 0.752906 | 1.479336 | 1.481700 | 3.753222 | 16336.714749 | 22621.369138 | 41.417938 | 0.004217 | 4.155137 | 130.896181 | 203.174711 | 16.757238 | 9.843788 | 1.881283 | 28.546477 | 40.393763 | 8.386796 | 37.397150 | 0.311009 | 3.606718 | 5.121754 | 5.218427 | 8.495158 | 8.391106 | 8.518635 | 14.823038 | 5.091835 | 11.992360 | 0.000186 | 0.000968 | 0.038966 | 1.622431 | 96.224253 | 22.972098 | 0.069866 | 0.027441 | 228324.054444 | 52200.915955 | 35655.418555 | 45642.424533 | 33359.464921 | 697.994338 | 701.994385 | 0.497051 | 1.852371 | 11.663741 | 46.489331 | 2.855013 | 13.325548 | 0.033168 | 0.045718 | 39.568498 | 3.000000 | 57.724234 | 3.000000 | 11.056569 | 173.128550 | 9636.718394 | 105.745985 | 3614.041361 | 47.888341 | 11.570976 |
| 1 | B | 14173.338199 | 14168.424604 | 14150.038687 | 10.675806 | 415.671787 | 78813.567867 | 17.966630 | 0.308462 | 699.831401 | 703.831538 | 0.484182 | 34.637664 | 72.208389 | 11.474028 | 0.203080 | 16564.879623 | 48.943646 | 24.126534 | 4032.789954 | 4030.831173 | 11280.631945 | 11263.091644 | 9450.006026 | 1758.234585 | 1.038099 | 71.353233 | 11.847736 | 3118.597919 | 696.907039 | 687.921912 | 0.018769 | 44.167866 | 1.000000 | 127304.121471 | 18.430656 | 0.003914 | 245.801210 | 143093.160174 | 0.851023 | 2.715814 | 0.602768 | 1.439360 | 22.491902 | 34464.910981 | 68.072535 | 1.201862 | 2.603168 | 5836.759882 | 55.787216 | 34752.367671 | 0.916819 | 1.435874 | 1.855963 | 4.208887 | 13785.824536 | 11486.051974 | 56.308644 | 0.008672 | 11.013349 | 127.054717 | 186.415885 | 14.794100 | 8.880734 | 1.588616 | 26.136680 | 39.480341 | 7.512708 | 35.857827 | 0.510841 | 3.646083 | 5.512751 | 4.768997 | 7.838473 | 8.230000 | 8.179138 | 14.128813 | 5.459563 | 11.488868 | 0.000685 | 0.002545 | 0.083539 | 1.878464 | 93.932633 | 39.719460 | 0.133716 | 0.047597 | 179418.515499 | 49717.286644 | 23411.932050 | 42662.250000 | 33977.827760 | 675.488737 | 679.488770 | 0.581059 | 1.644669 | 11.566736 | 55.790209 | 2.994476 | 12.869505 | 0.038040 | 0.066356 | 38.215818 | 3.000000 | 82.597344 | 3.000000 | 12.865741 | 252.984301 | 9477.794579 | 124.183274 | 3864.770606 | 48.005328 | 12.170489 |
| 2 | C | 15038.083318 | 15035.016760 | 15020.234785 | 14.143689 | 436.434776 | 74370.290585 | 19.552054 | 0.349362 | 689.274275 | 693.274308 | 0.621835 | 33.852494 | 71.667656 | 11.509902 | 0.226707 | 16192.960348 | 54.435478 | 23.697646 | 4380.077980 | 4379.679354 | 12065.999593 | 12050.930068 | 9295.298810 | 2624.210497 | 1.670733 | 144.819561 | 24.419988 | 3485.202942 | 675.067999 | 661.750842 | 0.020970 | 43.743886 | 1.000000 | 117812.557706 | 19.831567 | 0.005018 | 271.391123 | 133557.278487 | 0.989305 | 2.807020 | 0.716942 | 1.628813 | 20.615709 | 35914.478215 | 71.010697 | 1.383792 | 2.935388 | 5608.045335 | 61.108416 | 30053.823960 | 1.089479 | 1.476316 | 2.204884 | 4.728480 | 12745.601976 | 8017.045886 | 63.058008 | 0.009793 | 15.357485 | 124.148325 | 174.372043 | 13.221848 | 7.858346 | 1.448208 | 23.678006 | 38.946148 | 6.697979 | 35.338614 | 0.558317 | 3.703387 | 5.781786 | 4.640977 | 7.438910 | 8.390343 | 8.151801 | 13.667211 | 5.726194 | 11.504010 | 0.000700 | 0.003468 | 0.096458 | 2.188405 | 93.422794 | 48.535797 | 0.146450 | 0.053522 | 163534.964652 | 50674.261355 | 19526.494324 | 43110.504949 | 33439.787441 | 661.784074 | 665.784105 | 0.666615 | 1.456062 | 11.465559 | 62.077744 | 3.047078 | 12.360938 | 0.044172 | 0.081191 | 37.051854 | 3.000000 | 132.367920 | 3.000000 | 13.616511 | 398.206987 | 11384.090485 | 199.159521 | 4613.433803 | 47.869969 | 13.105859 |
| 3 | D | 15711.983007 | 15708.109064 | 15687.622218 | 18.143067 | 475.811899 | 71030.182415 | 20.929692 | 0.365597 | 683.956381 | 687.956384 | 0.761925 | 33.539817 | 71.635280 | 11.536901 | 0.228461 | 15737.423461 | 57.443781 | 23.562756 | 4218.754865 | 4218.336403 | 12979.532641 | 12959.125504 | 9258.854256 | 3477.684500 | 2.377446 | 240.616447 | 40.278937 | 3805.848000 | 659.346053 | 641.745617 | 0.021729 | 43.392430 | 1.000000 | 113501.778303 | 21.177514 | 0.005255 | 269.081126 | 126264.624834 | 1.124442 | 2.897003 | 0.850390 | 1.844224 | 18.498656 | 37234.071194 | 72.947128 | 1.501981 | 3.128740 | 5332.058307 | 64.083391 | 27385.887265 | 1.265052 | 1.512206 | 2.498988 | 5.114931 | 11926.542777 | 6282.300925 | 66.634183 | 0.010249 | 17.835493 | 122.030709 | 166.949242 | 12.141575 | 7.093249 | 1.349198 | 22.061365 | 38.798639 | 6.090571 | 35.196183 | 0.572285 | 3.724798 | 5.950887 | 4.563439 | 7.250755 | 8.573914 | 8.152504 | 13.464247 | 5.887478 | 11.545848 | 0.000804 | 0.003605 | 0.103028 | 2.446810 | 93.321987 | 53.616259 | 0.147603 | 0.052369 | 152808.919437 | 51209.227701 | 17282.340122 | 43711.880814 | 33221.241919 | 651.102049 | 655.102049 | 0.744219 | 1.276633 | 11.257872 | 65.630496 | 3.108920 | 11.741113 | 0.065782 | 0.105754 | 34.942553 | 3.000000 | 181.173992 | 3.000000 | 14.435593 | 537.719402 | 12177.585792 | 228.317182 | 5460.201646 | 47.849788 | 13.684281 |
| 4 | E | 17453.078392 | 17438.840230 | 17403.817447 | 21.829653 | 527.837416 | 71855.514982 | 21.549435 | 0.359870 | 682.421169 | 686.421169 | 0.886315 | 33.591627 | 70.709463 | 11.764719 | 0.229434 | 16466.620795 | 59.132823 | 24.230430 | 3357.634223 | 3356.989646 | 15758.512018 | 15721.681790 | 10307.238145 | 5021.547732 | 3.212333 | 426.513815 | 70.680679 | 4777.935468 | 647.282839 | 624.835593 | 0.019916 | 43.493347 | 1.000000 | 111264.459148 | 21.992361 | 0.006311 | 226.277956 | 129130.727273 | 1.246142 | 2.968929 | 0.968447 | 2.029745 | 16.679167 | 38683.620668 | 74.712088 | 1.619417 | 3.320204 | 5375.201615 | 65.702558 | 27556.622737 | 1.343876 | 1.543894 | 2.757233 | 5.475188 | 11988.645029 | 5805.832257 | 68.340239 | 0.010198 | 15.659668 | 121.727742 | 165.888880 | 11.457233 | 6.561715 | 1.421551 | 21.072107 | 39.181006 | 5.548199 | 35.535185 | 0.565527 | 3.751342 | 6.089011 | 4.596307 | 7.380233 | 8.836915 | 8.306473 | 13.769876 | 6.022706 | 11.782014 | 0.001062 | 0.004119 | 0.100348 | 2.677114 | 93.642584 | 56.153995 | 0.145335 | 0.053293 | 154996.803445 | 53323.968880 | 17005.209618 | 44905.600130 | 33928.537406 | 644.338261 | 648.338261 | 0.801568 | 1.195582 | 10.921803 | 66.926438 | 3.072675 | 11.458675 | 0.080691 | 0.135198 | 32.897588 | 3.000000 | 255.100390 | 3.000000 | 14.910175 | 755.229843 | 14156.070469 | 271.689006 | 6471.356570 | 47.219321 | 14.429557 |
| 5 | F | 19124.646531 | 19102.398923 | 19046.200351 | 25.454091 | 590.666128 | 72657.784855 | 21.676804 | 0.359354 | 680.383732 | 684.383756 | 1.072057 | 33.362225 | 70.308861 | 11.985550 | 0.240598 | 16416.079809 | 60.039823 | 24.690024 | 2875.231816 | 2873.980604 | 17685.685040 | 17631.103696 | 10619.853522 | 6411.778151 | 4.118783 | 649.934592 | 105.322041 | 5471.972946 | 634.976962 | 606.819617 | 0.018761 | 43.830162 | 1.000000 | 109972.202110 | 23.075271 | 0.006627 | 243.477569 | 129388.028929 | 1.402106 | 3.134835 | 1.154179 | 2.345743 | 14.482328 | 41659.211481 | 76.522294 | 1.751916 | 3.586944 | 5418.370614 | 67.229169 | 26972.962189 | 1.516346 | 1.668909 | 3.162157 | 5.938639 | 11830.799975 | 5488.952311 | 69.413099 | 0.009237 | 16.701962 | 120.247655 | 161.820604 | 10.411030 | 5.816640 | 1.429453 | 19.754421 | 39.238417 | 4.882208 | 35.366267 | 0.567644 | 3.775467 | 6.171191 | 4.613817 | 7.456368 | 9.085407 | 8.440912 | 13.921016 | 6.119229 | 12.000722 | 0.000914 | 0.004642 | 0.095644 | 2.985749 | 93.875724 | 57.700563 | 0.147502 | 0.060056 | 154156.080314 | 54540.676633 | 16444.488484 | 46041.823464 | 34949.431089 | 642.146004 | 646.146004 | 0.873505 | 1.144116 | 11.366268 | 68.324419 | 3.324103 | 11.561359 | 0.081183 | 0.121460 | 32.685962 | 3.000000 | 340.789979 | 3.000000 | 15.480932 | 997.075765 | 15858.031970 | 225.898602 | 7622.677780 | 47.107979 | 14.389303 |
| 6 | G | 20383.988741 | 20365.672255 | 20266.535199 | 28.074255 | 661.095207 | 75241.685705 | 22.432815 | 0.372863 | 679.238577 | 683.238577 | 1.229290 | 32.950847 | 68.358177 | 12.283613 | 0.243261 | 17140.858235 | 59.283907 | 24.822156 | 3300.616474 | 3299.318949 | 18029.599678 | 17930.829966 | 10423.562473 | 6847.063420 | 5.731917 | 753.241874 | 123.042726 | 5909.421193 | 628.476907 | 595.715812 | 0.018584 | 43.853583 | 1.000000 | 108782.867823 | 23.897079 | 0.007972 | 216.323949 | 131116.902676 | 1.511824 | 3.175288 | 1.286876 | 2.566805 | 13.202383 | 42216.922997 | 77.553085 | 1.861957 | 3.786876 | 5427.444132 | 67.920609 | 27993.609141 | 1.677210 | 1.830180 | 3.507685 | 6.466322 | 11683.602381 | 5972.549899 | 67.861561 | 0.007730 | 21.785010 | 117.388512 | 158.779632 | 9.670577 | 5.324904 | 1.393454 | 17.915576 | 38.737666 | 4.434333 | 35.149311 | 0.595325 | 3.816562 | 6.206552 | 4.685919 | 7.421967 | 9.202120 | 8.610532 | 13.846628 | 6.186827 | 12.285850 | 0.000892 | 0.005648 | 0.102016 | 3.316649 | 94.016268 | 55.681641 | 0.153261 | 0.061401 | 156403.383212 | 57076.649699 | 17005.434109 | 47835.765294 | 38291.791925 | 641.972050 | 645.972050 | 0.964286 | 1.173913 | 11.229814 | 68.728296 | 3.197205 | 11.560559 | 0.088509 | 0.128882 | 31.322835 | 3.000000 | 394.401892 | 3.000000 | 14.540541 | 1150.346139 | 16621.691959 | 200.988378 | 8347.988086 | 48.277119 | 14.878601 |
figure_scatter_group = plotter('scatter_',df_groupby_grade_2,0,0,0,'loan_amnt','installment','int_rate','grade')#px.scatter(purpose, x="loan_amnt", y="int_rate",
#size="installment",color='purpose', log_x=True, size_max=100)
figure_scatter_group.show()
A = df_2[df_2['grade']=='A']
B = df_2[df_2['grade']=='B']
C = df_2[df_2['grade']=='C']
D = df_2[df_2['grade']=='D']
E = df_2[df_2['grade']=='E']
F = df_2[df_2['grade']=='F']
G = df_2[df_2['grade']=='G']
#figure = plotter('histogram',A,0,0,0,'loan_amnt')
x0= A['int_rate'].values
x1= B['int_rate'].values
x2= C['int_rate'].values
x3= D['int_rate'].values
x4= E['int_rate'].values
df_20000 = pd.DataFrame(dict(
Grades=np.concatenate((["A"]*len(x0), ["B"]*len(x1),["C"]*len(x2),["D"]*len(x3),["E"]*len(x4))),
interest_rate =np.concatenate((x0,x1,x2,x3,x4))))
#figure = plotter('histogram',df_20000,0,0,0,"interest_rate","Grades")#px.histogram(df_20000, x="interest_rate", color="Grades", barmode="overlay")
#figure.show()
sns.set()
fig = mp.figure(figsize=(22,10))
sns.kdeplot(x0,fill=True, label = 'Category-A')
sns.kdeplot(x1,fill=True, label = 'Category-B')
sns.kdeplot(x2,fill=True, label = 'Category-C')
sns.kdeplot(x3,fill=True, label = 'Category-D')
#sns.kdeplot(x4,fill=True, label = 'Category-E')
mp.xlabel('Interest Rate (%)',fontsize=15)
mp.ylabel('Density',fontsize=15)
mp.title('Distribution of Interest Rate',fontsize=20)
mp.legend()
#sns.kdeplot(df.loc[df['TARGET'] == 0, 'int_rate'], label = 'target = 0');
mp.show()
purpose = df_2.groupby('purpose').mean().reset_index(level=0)
purpose = purpose.sort_values(by=['loan_amnt'],ascending=True)
purpose
| purpose | loan_amnt | funded_amnt | funded_amnt_inv | int_rate | installment | annual_inc | dti | delinq_2yrs | fico_range_low | ... | deferral_term | hardship_amount | hardship_length | hardship_dpd | orig_projected_additional_accrued_interest | hardship_payoff_balance_amount | hardship_last_payment_amount | settlement_amount | settlement_percentage | settlement_term | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 12 | vacation | 6357.995169 | 6355.937198 | 6346.113494 | 13.450725 | 203.765864 | 69815.777456 | 18.377908 | 0.316779 | 700.455717 | ... | 3.0 | 75.161081 | 3.0 | 12.324324 | 205.816071 | 5480.879189 | 99.025405 | 2412.036031 | 48.661284 | 11.918288 |
| 3 | educational | 6614.622642 | 6511.733491 | 5069.612080 | 12.142146 | 214.345991 | 51280.175896 | 11.269033 | 0.183962 | 706.025943 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 6345.495000 | 60.195000 | 0.000000 |
| 8 | moving | 8390.811855 | 8385.390833 | 8367.415100 | 14.738520 | 264.945157 | 70349.695167 | 17.330161 | 0.358826 | 699.125170 | ... | 3.0 | 106.538030 | 3.0 | 12.742424 | 336.617872 | 8537.259545 | 120.470455 | 3165.664217 | 48.330739 | 10.782609 |
| 0 | car | 9393.720068 | 9389.608754 | 9367.329546 | 12.182095 | 282.744916 | 70224.040136 | 15.502546 | 0.319619 | 707.799109 | ... | 3.0 | 99.918286 | 3.0 | 13.957143 | 299.714706 | 8252.836286 | 158.073714 | 3423.622453 | 48.285566 | 12.712264 |
| 7 | medical | 9474.190556 | 9469.836838 | 9453.213759 | 13.632130 | 288.833904 | 73633.453873 | 18.373266 | 0.348916 | 702.600589 | ... | 3.0 | 108.293802 | 3.0 | 12.446281 | 327.684356 | 8146.429421 | 127.189421 | 3609.819946 | 49.010352 | 11.978320 |
| 13 | wedding | 10475.859873 | 10411.433121 | 10121.859611 | 14.154514 | 331.070093 | 69553.095911 | 13.975724 | 0.236093 | 705.537155 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 4181.334500 | 49.121000 | 2.150000 |
| 9 | other | 10481.091150 | 10475.448401 | 10451.541763 | 14.235322 | 323.704264 | 72880.924637 | 17.354981 | 0.333128 | 701.298910 | ... | 3.0 | 142.173085 | 3.0 | 14.064677 | 404.289186 | 9798.459668 | 173.504511 | 3637.528992 | 48.635664 | 11.807349 |
| 10 | renewable_energy | 10757.024221 | 10742.179931 | 10683.361059 | 14.728131 | 340.821827 | 73788.823855 | 16.766177 | 0.296886 | 700.231834 | ... | 3.0 | 202.067143 | 3.0 | 15.571429 | 716.167500 | 14463.457143 | 260.985714 | 3946.078261 | 51.841304 | 9.652174 |
| 6 | major_purchase | 12682.430370 | 12673.914164 | 12651.892442 | 12.763690 | 375.514827 | 79555.699731 | 15.490963 | 0.306849 | 709.860442 | ... | 3.0 | 157.314599 | 3.0 | 15.527426 | 423.126404 | 11923.439325 | 205.144599 | 4558.701160 | 48.125190 | 12.270042 |
| 4 | home_improvement | 14666.147969 | 14659.377264 | 14639.927683 | 12.621047 | 429.794559 | 92490.407980 | 16.956423 | 0.371993 | 706.761035 | ... | 3.0 | 165.635950 | 3.0 | 12.758772 | 481.449305 | 12536.885760 | 212.015000 | 5018.194322 | 47.762656 | 13.098454 |
| 1 | credit_card | 15319.730362 | 15316.716653 | 15303.747832 | 11.696429 | 449.477278 | 77942.809497 | 19.037401 | 0.254705 | 697.671262 | ... | 3.0 | 130.329337 | 3.0 | 13.482383 | 388.204243 | 11010.797067 | 178.019819 | 4813.831270 | 47.616005 | 13.186872 |
| 5 | house | 15703.917303 | 15693.237125 | 15662.478667 | 14.396239 | 472.987479 | 84530.380514 | 15.014354 | 0.354344 | 708.028792 | ... | 3.0 | 201.324231 | 3.0 | 15.057692 | 570.024474 | 13658.477692 | 219.678846 | 5093.994234 | 48.509927 | 13.868613 |
| 2 | debt_consolidation | 15966.695954 | 15961.735265 | 15945.657999 | 13.523100 | 472.674870 | 76880.851503 | 19.474495 | 0.314682 | 696.717094 | ... | 3.0 | 163.818640 | 3.0 | 13.793550 | 482.453724 | 12013.851850 | 200.792103 | 5291.282748 | 47.702213 | 13.435871 |
| 11 | small_business | 16442.694115 | 16399.216250 | 16263.564957 | 15.263721 | 513.012296 | 93972.674709 | 15.031074 | 0.334967 | 705.260440 | ... | 3.0 | 153.137378 | 3.0 | 16.164634 | 425.207946 | 11524.995976 | 182.773049 | 5330.912970 | 47.489769 | 12.033003 |
14 rows × 113 columns
figure_purpose = plotter('bar_h',purpose,0,0,0,'loan_amnt','purpose','loan_amnt')
figure_purpose.show()
figure_scatter = plotter('scatter_',purpose,0,0,0,'loan_amnt','installment','int_rate','purpose')#px.scatter(purpose, x="loan_amnt", y="int_rate",
#size="installment",color='purpose', log_x=True, size_max=100)
figure_scatter.show()
term = df_2.groupby('term').mean().reset_index(level=0)
term.style.set_properties(**{'background-color': 'black',
'color': 'lawngreen',
'border-color': 'white'})
| term | loan_amnt | funded_amnt | funded_amnt_inv | int_rate | installment | annual_inc | dti | delinq_2yrs | fico_range_low | fico_range_high | inq_last_6mths | mths_since_last_delinq | mths_since_last_record | open_acc | pub_rec | revol_bal | revol_util | total_acc | out_prncp | out_prncp_inv | total_pymnt | total_pymnt_inv | total_rec_prncp | total_rec_int | total_rec_late_fee | recoveries | collection_recovery_fee | last_pymnt_amnt | last_fico_range_high | last_fico_range_low | collections_12_mths_ex_med | mths_since_last_major_derog | policy_code | annual_inc_joint | dti_joint | acc_now_delinq | tot_coll_amt | tot_cur_bal | open_acc_6m | open_act_il | open_il_12m | open_il_24m | mths_since_rcnt_il | total_bal_il | il_util | open_rv_12m | open_rv_24m | max_bal_bc | all_util | total_rev_hi_lim | inq_fi | total_cu_tl | inq_last_12m | acc_open_past_24mths | avg_cur_bal | bc_open_to_buy | bc_util | chargeoff_within_12_mths | delinq_amnt | mo_sin_old_il_acct | mo_sin_old_rev_tl_op | mo_sin_rcnt_rev_tl_op | mo_sin_rcnt_tl | mort_acc | mths_since_recent_bc | mths_since_recent_bc_dlq | mths_since_recent_inq | mths_since_recent_revol_delinq | num_accts_ever_120_pd | num_actv_bc_tl | num_actv_rev_tl | num_bc_sats | num_bc_tl | num_il_tl | num_op_rev_tl | num_rev_accts | num_rev_tl_bal_gt_0 | num_sats | num_tl_120dpd_2m | num_tl_30dpd | num_tl_90g_dpd_24m | num_tl_op_past_12m | pct_tl_nvr_dlq | percent_bc_gt_75 | pub_rec_bankruptcies | tax_liens | tot_hi_cred_lim | total_bal_ex_mort | total_bc_limit | total_il_high_credit_limit | revol_bal_joint | sec_app_fico_range_low | sec_app_fico_range_high | sec_app_inq_last_6mths | sec_app_mort_acc | sec_app_open_acc | sec_app_revol_util | sec_app_open_act_il | sec_app_num_rev_accts | sec_app_chargeoff_within_12_mths | sec_app_collections_12_mths_ex_med | sec_app_mths_since_last_major_derog | deferral_term | hardship_amount | hardship_length | hardship_dpd | orig_projected_additional_accrued_interest | hardship_payoff_balance_amount | hardship_last_payment_amount | settlement_amount | settlement_percentage | settlement_term | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 36 months | 12745.526879 | 12742.965043 | 12721.595073 | 11.947973 | 422.153386 | 75414.009671 | 18.299525 | 0.311921 | 698.346400 | 702.346593 | 0.577691 | 34.425553 | 71.552361 | 11.344336 | 0.203896 | 15446.261241 | 49.281468 | 23.432710 | 2881.076746 | 2879.964888 | 10706.944537 | 10686.102363 | 9030.846144 | 1583.977800 | 1.337376 | 90.783216 | 15.262711 | 2876.889552 | 689.332755 | 677.448442 | 0.019095 | 44.012645 | 1.000000 | 121486.971331 | 18.845329 | 0.004150 | 245.313108 | 131116.389949 | 0.932466 | 2.706901 | 0.656109 | 1.509521 | 21.835684 | 33261.464994 | 68.799604 | 1.314810 | 2.784532 | 5462.311306 | 56.410001 | 32956.329919 | 0.990964 | 1.378336 | 2.000538 | 4.468826 | 12670.698579 | 11233.093909 | 56.963027 | 0.008611 | 12.786553 | 123.274405 | 178.539511 | 13.810324 | 8.339177 | 1.430442 | 24.413195 | 39.316443 | 7.087142 | 35.725502 | 0.516399 | 3.602263 | 5.509567 | 4.678437 | 7.595367 | 8.060013 | 8.098353 | 13.753445 | 5.460560 | 11.359324 | 0.000666 | 0.002791 | 0.086410 | 2.068691 | 93.867224 | 41.335244 | 0.130892 | 0.048933 | 165671.847464 | 47618.293577 | 22185.627048 | 41094.318221 | 31242.748225 | 667.567585 | 671.567617 | 0.636093 | 1.410762 | 11.008610 | 57.486758 | 2.871882 | 12.166252 | 0.052895 | 0.087254 | 36.167996 | 3.000000 | 109.868911 | 3.000000 | 13.392209 | 328.102673 | 9225.530034 | 162.642997 | 3716.105839 | 48.103806 | 12.070763 |
| 1 | 60 months | 20738.458614 | 20726.500966 | 20716.049134 | 15.924135 | 504.303360 | 84369.016088 | 20.122341 | 0.294411 | 699.186206 | 703.186404 | 0.574719 | 34.834033 | 74.365857 | 12.275336 | 0.181778 | 19656.302197 | 52.949312 | 25.967469 | 7485.720141 | 7485.253492 | 15484.538335 | 15473.003978 | 10680.294078 | 4527.089087 | 1.966269 | 275.188905 | 45.547353 | 4795.607666 | 683.526623 | 670.819356 | 0.015799 | 44.567616 | 1.000000 | 126552.590734 | 19.808570 | 0.004143 | 201.895471 | 170373.691285 | 0.939434 | 2.965458 | 0.728580 | 1.699342 | 19.674642 | 41267.846216 | 69.988742 | 1.226811 | 2.661115 | 6689.316766 | 58.629086 | 38538.626178 | 1.069068 | 1.731262 | 2.129376 | 4.651751 | 15697.476250 | 11790.180316 | 60.201272 | 0.008101 | 11.339257 | 131.665549 | 188.726896 | 14.548016 | 8.195243 | 1.863054 | 25.905385 | 39.268573 | 6.871241 | 35.929568 | 0.460524 | 3.856964 | 5.923338 | 5.009514 | 8.047561 | 9.279667 | 8.609678 | 14.620270 | 5.865669 | 12.288815 | 0.000566 | 0.002869 | 0.074428 | 2.096519 | 94.720815 | 45.136554 | 0.121525 | 0.041425 | 209053.379138 | 59407.031740 | 25676.361666 | 50196.864823 | 36847.275554 | 672.731941 | 676.731963 | 0.629397 | 1.713434 | 12.096338 | 59.087419 | 3.199187 | 13.032054 | 0.037451 | 0.064393 | 38.127000 | 3.000000 | 228.998879 | 3.000000 | 14.319565 | 672.228904 | 15584.165447 | 245.315075 | 7124.797822 | 47.252155 | 15.021298 |
figure_term = plotter('donut_pie',term,0,0,0,list(term['loan_amnt'].values),list(term['term'].values))
#plot(figure_term,show_link=True,filename='plot_term.html')
figure_term.show()
region_data = df_2.groupby('addr_state')[['loan_amnt','annual_inc']].median().reset_index(level=0)
#region_data = region_data.drop(12,axis=0)
fig_ = go.Figure(data=go.Choropleth(
locations=region_data['addr_state'], # Spatial coordinates
z = region_data['loan_amnt'].astype(float), # Data to be color-coded
locationmode = 'USA-states', # set of locations match entries in `locations`
colorscale = 'hot',
colorbar_title = "Loan-Amount",
))
fig_.update_layout(
title_text = 'Median-Loan distribution across the states',
geo_scope='usa', # limite map scope to USA
)
#plot(fig_,show_link=True,filename='plot_geo_loan.html')
fig_.show()
fig_2 = go.Figure(data=go.Choropleth(
locations=region_data['addr_state'], # Spatial coordinates
z = region_data['annual_inc'].astype(float), # Data to be color-coded
locationmode = 'USA-states', # set of locations match entries in `locations`
colorscale = 'hot',
colorbar_title = "Annual-Income",
))
fig_2.update_layout(
title_text = 'Median annual income',
geo_scope='usa', # limite map scope to USA
)
#plot(fig_,show_link=True,filename='plot_geo_loan.html')
fig_2.show()
float_2 = float_data.reset_index(level=0)
filter_20 = float_2.iloc[0:5000,0:20]
filter_20.keys()
Index(['index', 'loan_amnt', 'funded_amnt', 'funded_amnt_inv', 'int_rate',
'installment', 'annual_inc', 'dti', 'delinq_2yrs', 'fico_range_low',
'fico_range_high', 'inq_last_6mths', 'mths_since_last_delinq',
'mths_since_last_record', 'open_acc', 'pub_rec', 'revol_bal',
'revol_util', 'total_acc', 'out_prncp'],
dtype='object')
#convertor
loan_status_state = pd.DataFrame(df_2[df_2['loan_status']=='Charged Off'].groupby('addr_state')['loan_status'].count().sort_values(ascending=True))
loan_status_state.reset_index(inplace=True)
loan_status_state.rename(columns={'addr_state':'State','loan_status':'Charged-off'},inplace=True)
figure_purpose_loan = plotter('bar_h',loan_status_state,0,0,0,'Charged-off','State','Charged-off')
figure_purpose_loan.show()
loan_status_state_paid = pd.DataFrame(df_2[df_2['loan_status']=='Current'].groupby('addr_state')['loan_status'].count().sort_values(ascending=True))
loan_status_state_paid.reset_index(inplace=True)
loan_status_state_paid.rename(columns={'addr_state':'State','loan_status':'Current'},inplace=True)
figure_purpose_loan = plotter('bar_h',loan_status_state_paid,0,0,0,'Current','State','Current')
figure_purpose_loan.show()
defaulters = df_2[df_2['loan_status']=='Default']
loan_payers = df_2[df_2['loan_status']=='Current']
charged_off = df_2[df_2['loan_status']=='Charged Off']
df_interest_rate = pd.DataFrame({'Charged-off':charged_off['int_rate'],'Payers':loan_payers['int_rate']})
df_interest_rate.head(5).style.set_properties(**{'background-color': 'black',
'color': 'lawngreen',
'border-color': 'white'})
| Charged-off | Payers | |
|---|---|---|
| 3 | nan | 14.850000 |
| 10 | nan | 12.880000 |
| 11 | nan | 12.880000 |
| 13 | 19.480000 | nan |
| 18 | nan | 8.490000 |
fig_ = plotter('density',loan_payers,0,0,0,[charged_off['int_rate'],loan_payers['int_rate']],['Charged-off loans','Payers'],1.1)
fig_.show()
## Plotly's violin plot doesn't like NaN values so I am going to manually remove them and make a new dataframe
## and pass it to plotly function
df_grade = pd.DataFrame(data = {'Interest':df_2['int_rate'].dropna(),'Grade':df_2['grade'].dropna()})
#fig_violin = plotter('violin',df_grade,0,0,0,'Interest','Grade','Grade')#px.violin(df_grade, y='Interest',x='Grade',color='Grade')
#fig_violin.show()
fig = mp.figure(figsize=(15,12))
sns.violinplot(x="grade",y="int_rate",data=df_2,hue="term", split=True,color='red')
mp.show()
## To check a rough correlation of the variables
fig_scatter = plotter('scatter_matrix',filter_20,0,0,0,5000,5000)
fig_scatter.show()
df_loan_int = pd.DataFrame({'Loan_amnt':filter_20['loan_amnt'],'Installment':filter_20['installment'],'Interest':filter_20['int_rate'],'Annual Income':filter_20['annual_inc']})
corr_spearman = df_loan_int.corr(method='spearman')
corr_spearman.values
array([[ 1. , 0.96112881, 0.1477271 , 0.46415442],
[ 0.96112881, 1. , 0.13490544, 0.44140613],
[ 0.1477271 , 0.13490544, 1. , -0.13461241],
[ 0.46415442, 0.44140613, -0.13461241, 1. ]])
fig_cor = px.imshow(corr_spearman)
fig_cor.show()
fig_cor_2 = px.imshow(df_loan_int.corr(method='pearson'))
fig_cor_2.show()
#labelencoder = LabelEncoder()
#df_2['loan_status_numeric'] = ''
df_2['loan_status_binary']=''
mask = (df_2['loan_status'].isnull())
#transform = labelencoder.fit_transform(df_2['loan_status'][~mask])
#inverse=labelencoder.inverse_transform(transform)
#list(inverse)
#df_2['loan_status_numeric'][~mask] = transform#labelencoder.fit_transform(df_2['loan_status_coded'][~mask])
#df_2['loan_status_numeric'][mask] = np.nan
df_2['loan_status_binary'][~mask] = (df_2['loan_status'] == 'Charged Off').astype('float64')
df_2['loan_status_binary'][mask]= 0
## since I don't care about other categories--this simply goes to 0.
df_2['loan_status_binary']=df_2['loan_status_binary'].astype('float64')
#df_2['loan_status_numeric'].fillna(max(df_2['loan_status_numeric'].unique())+1,inplace=True)
df_2['loan_status_binary'].dtype
dtype('float64')
### df_2['loan_status_numeric'] = df_2['loan_status'].map(convertor)
## This can be another solution to encode the loan_status variable
#df_2['loan_status_numeric']
#df_2['loan_status_binary'] = (df_2['loan_status_numeric'] == 0).astype('float64')
df_2[['loan_status','loan_status_binary']].head(20).style.set_properties(**{'background-color': 'black',
'color': 'lawngreen',
'border-color': 'white'})
| loan_status | loan_status_binary | |
|---|---|---|
| 0 | Fully Paid | 0.000000 |
| 1 | Fully Paid | 0.000000 |
| 2 | Fully Paid | 0.000000 |
| 3 | Current | 0.000000 |
| 4 | Fully Paid | 0.000000 |
| 5 | Fully Paid | 0.000000 |
| 6 | Fully Paid | 0.000000 |
| 7 | Fully Paid | 0.000000 |
| 8 | Fully Paid | 0.000000 |
| 9 | Fully Paid | 0.000000 |
| 10 | Current | 0.000000 |
| 11 | Current | 0.000000 |
| 12 | Fully Paid | 0.000000 |
| 13 | Charged Off | 1.000000 |
| 14 | Fully Paid | 0.000000 |
| 15 | Fully Paid | 0.000000 |
| 16 | Fully Paid | 0.000000 |
| 17 | Fully Paid | 0.000000 |
| 18 | Current | 0.000000 |
| 19 | Fully Paid | 0.000000 |
#df_2.to_csv('Data/Lending_Club_clean.csv')
df_2.term
0 36 months
1 36 months
2 60 months
3 60 months
4 60 months
...
2260696 60 months
2260697 60 months
2260698 60 months
2260699 NaN
2260700 NaN
Name: term, Length: 2260701, dtype: object
df_2.drop(['term'],axis=1,inplace=True)
df_2.desc.unique()
array([nan,
'We knew that using our credit cards to finance an adoption would squeeze us, but then medical and other unexpected expenses made the situation almost impossible. We are a stable family in a stable community. We just need to break a cycle of debt that is getting worse.',
"I had a bad year two years ago, with some late and missed payments. I'm doing much better now, but I've got fees and some higher interest bits that have added up on top of the other stuff, and it's a little crazy. I'm hoping doing it thru Lending Club will make it easier - and cheaper - to pay off.",
...,
'This loan will be used solely to consolidate credit card debts accrued while wife was/is unemployed.',
'I have recently purchased and built a new home that I have always dreamed of having. I would like to complete the project by putting a hottub in my backyard, however; I am not happy with the rate I have been offered from GE to finance the spa. I am paying cash for all other improvements, but this is the final phase and finishing touch to my happiness. I am in the process of consolidating a lot of debt, and went through a minor period of financial woes, but through determination and hard work I have managed to rebound. My income is fantastic, and I would pay cash for the item, but would like to reserve the money I have saved for future issues if they should arise. I am a college graduate, responsible, and work for a very good company that is stable in this very unstable market. I plan to repay this loan in less than 12 months with a 4th quarter bonus I will be receiving. Thank you for your consideration.',
'To whom it may concern, Hello, my name is David McLean. I am requesting a loan to consolidate some high interest revolving credit. The interest rates go anywhere from 14-29.9%. I am a very reliable person that meets his obligations and pays his debts. In nearly 15 years, I have not missed or been late on a payment except once due to an oversight. I have a stable life and home with a good job of nearly 6yrs with plans of retiring from there. Thank you for your thoughtful consideration.'],
dtype=object)
df_2.drop(['desc'],axis=1,inplace=True)
df_2['url'].unique()
array(['https://lendingclub.com/browse/loanDetail.action?loan_id=68407277',
'https://lendingclub.com/browse/loanDetail.action?loan_id=68355089',
'https://lendingclub.com/browse/loanDetail.action?loan_id=68341763',
...,
'https://lendingclub.com/browse/loanDetail.action?loan_id=88985880',
'https://lendingclub.com/browse/loanDetail.action?loan_id=88224441',
'https://lendingclub.com/browse/loanDetail.action?loan_id=88215728'],
dtype=object)
df_2.drop(['url'],axis=1,inplace=True)
df_2.select_dtypes('object').keys()
Index(['id', 'grade', 'sub_grade', 'emp_title', 'emp_length', 'home_ownership',
'verification_status', 'issue_d', 'loan_status', 'pymnt_plan',
'purpose', 'title', 'zip_code', 'addr_state', 'earliest_cr_line',
'initial_list_status', 'last_pymnt_d', 'next_pymnt_d',
'last_credit_pull_d', 'application_type', 'verification_status_joint',
'sec_app_earliest_cr_line', 'hardship_flag', 'hardship_type',
'hardship_reason', 'hardship_status', 'hardship_start_date',
'hardship_end_date', 'payment_plan_start_date', 'hardship_loan_status',
'disbursement_method', 'debt_settlement_flag',
'debt_settlement_flag_date', 'settlement_status', 'settlement_date'],
dtype='object')
df_2.drop(columns=['id'],inplace=True)
df_2.drop(columns=['emp_title'],inplace=True)
df_2.drop(columns=['addr_state'],inplace=True)
df_2.drop(columns=['zip_code'], inplace=True)
columns = list(df_2.select_dtypes(include=['object']).columns)
df_2[columns] = df_2[columns].fillna('')
df_2[columns].head(3).style.set_properties(**{'background-color': 'black',
'color': 'lawngreen',
'border-color': 'white'})
| grade | sub_grade | emp_length | home_ownership | verification_status | issue_d | loan_status | pymnt_plan | purpose | title | earliest_cr_line | initial_list_status | last_pymnt_d | next_pymnt_d | last_credit_pull_d | application_type | verification_status_joint | sec_app_earliest_cr_line | hardship_flag | hardship_type | hardship_reason | hardship_status | hardship_start_date | hardship_end_date | payment_plan_start_date | hardship_loan_status | disbursement_method | debt_settlement_flag | debt_settlement_flag_date | settlement_status | settlement_date | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | C | C4 | 10+ years | MORTGAGE | Not Verified | Dec-2015 | Fully Paid | n | debt_consolidation | Debt consolidation | Aug-2003 | w | Jan-2019 | Mar-2019 | Individual | N | Cash | N | |||||||||||||
| 1 | C | C1 | 10+ years | MORTGAGE | Not Verified | Dec-2015 | Fully Paid | n | small_business | Business | Dec-1999 | w | Jun-2016 | Mar-2019 | Individual | N | Cash | N | |||||||||||||
| 2 | B | B4 | 10+ years | MORTGAGE | Not Verified | Dec-2015 | Fully Paid | n | home_improvement | Aug-2000 | w | Jun-2017 | Mar-2019 | Joint App | Not Verified | N | Cash | N |
columns_float = list(df_2.select_dtypes(include=['float64']).columns)
null_mean = df_2[columns_float].isnull().mean()
null_mean_keys = null_mean.keys()
null_mean.unique()*100
array([1.45972422e-03, 1.63666049e-03, 7.71442132e-02, 2.74251217e-03,
2.78674623e-03, 5.12467151e+01, 8.41130694e+01, 8.11695134e-02,
7.87366397e-03, 7.43099596e+01, 9.46605057e+01, 9.46606827e+01,
3.11005303e+00, 3.83139124e+01, 3.83138681e+01, 4.02510991e+01,
4.72810425e+01, 3.83235554e+01, 2.21449011e+00, 3.11314942e+00,
3.31613955e+00, 3.36638945e+00, 6.15313569e+00, 3.11009727e+00,
3.24877107e+00, 7.70115110e+01, 1.30697514e+01, 6.72509102e+01,
2.59313372e+00, 6.79833379e+00, 3.11690931e+00, 3.33577948e+00,
6.18392260e-02, 6.10430128e-03, 9.52218361e+01, 9.52217918e+01,
9.53030498e+01, 9.84101392e+01, 9.95170967e+01, 9.96173311e+01,
9.84851601e+01, 0.00000000e+00])
greater_than_90=[i for i in null_mean_keys if null_mean[i] > 0.9]
df_2[greater_than_90] = df_2[greater_than_90].fillna(0)
null_mean = df_2[columns_float].isnull().mean()
null_mean.unique()*100
array([1.45972422e-03, 1.63666049e-03, 7.71442132e-02, 2.74251217e-03,
2.78674623e-03, 5.12467151e+01, 8.41130694e+01, 8.11695134e-02,
7.87366397e-03, 7.43099596e+01, 0.00000000e+00, 3.11005303e+00,
3.83139124e+01, 3.83138681e+01, 4.02510991e+01, 4.72810425e+01,
3.83235554e+01, 2.21449011e+00, 3.11314942e+00, 3.31613955e+00,
3.36638945e+00, 6.15313569e+00, 3.11009727e+00, 3.24877107e+00,
7.70115110e+01, 1.30697514e+01, 6.72509102e+01, 2.59313372e+00,
6.79833379e+00, 3.11690931e+00, 3.33577948e+00, 6.18392260e-02,
6.10430128e-03])
less_than_90=[i for i in null_mean_keys if null_mean[i] < 0.9]
df_2[less_than_90] = df_2[less_than_90].fillna(df_2[less_than_90].mean())
df_2.isnull().mean().unique()
array([0.])
columns_float.remove('loan_status_binary')
sorted(columns_float)
['acc_now_delinq', 'acc_open_past_24mths', 'all_util', 'annual_inc', 'annual_inc_joint', 'avg_cur_bal', 'bc_open_to_buy', 'bc_util', 'chargeoff_within_12_mths', 'collection_recovery_fee', 'collections_12_mths_ex_med', 'deferral_term', 'delinq_2yrs', 'delinq_amnt', 'dti', 'dti_joint', 'fico_range_high', 'fico_range_low', 'funded_amnt', 'funded_amnt_inv', 'hardship_amount', 'hardship_dpd', 'hardship_last_payment_amount', 'hardship_length', 'hardship_payoff_balance_amount', 'il_util', 'inq_fi', 'inq_last_12m', 'inq_last_6mths', 'installment', 'int_rate', 'last_fico_range_high', 'last_fico_range_low', 'last_pymnt_amnt', 'loan_amnt', 'max_bal_bc', 'mo_sin_old_il_acct', 'mo_sin_old_rev_tl_op', 'mo_sin_rcnt_rev_tl_op', 'mo_sin_rcnt_tl', 'mort_acc', 'mths_since_last_delinq', 'mths_since_last_major_derog', 'mths_since_last_record', 'mths_since_rcnt_il', 'mths_since_recent_bc', 'mths_since_recent_bc_dlq', 'mths_since_recent_inq', 'mths_since_recent_revol_delinq', 'num_accts_ever_120_pd', 'num_actv_bc_tl', 'num_actv_rev_tl', 'num_bc_sats', 'num_bc_tl', 'num_il_tl', 'num_op_rev_tl', 'num_rev_accts', 'num_rev_tl_bal_gt_0', 'num_sats', 'num_tl_120dpd_2m', 'num_tl_30dpd', 'num_tl_90g_dpd_24m', 'num_tl_op_past_12m', 'open_acc', 'open_acc_6m', 'open_act_il', 'open_il_12m', 'open_il_24m', 'open_rv_12m', 'open_rv_24m', 'orig_projected_additional_accrued_interest', 'out_prncp', 'out_prncp_inv', 'pct_tl_nvr_dlq', 'percent_bc_gt_75', 'policy_code', 'pub_rec', 'pub_rec_bankruptcies', 'recoveries', 'revol_bal', 'revol_bal_joint', 'revol_util', 'sec_app_chargeoff_within_12_mths', 'sec_app_collections_12_mths_ex_med', 'sec_app_fico_range_high', 'sec_app_fico_range_low', 'sec_app_inq_last_6mths', 'sec_app_mort_acc', 'sec_app_mths_since_last_major_derog', 'sec_app_num_rev_accts', 'sec_app_open_acc', 'sec_app_open_act_il', 'sec_app_revol_util', 'settlement_amount', 'settlement_percentage', 'settlement_term', 'tax_liens', 'tot_coll_amt', 'tot_cur_bal', 'tot_hi_cred_lim', 'total_acc', 'total_bal_ex_mort', 'total_bal_il', 'total_bc_limit', 'total_cu_tl', 'total_il_high_credit_limit', 'total_pymnt', 'total_pymnt_inv', 'total_rec_int', 'total_rec_late_fee', 'total_rec_prncp', 'total_rev_hi_lim']
corr_90 = []
for i, val in enumerate(columns_float):
for j in range(i+1,len(columns_float)):
temp =df_2[columns_float[i]].corr(df_2[columns_float[j]],method='pearson')
if temp>0.8:
corr_90.append(columns_float[i])
corr_90.append(columns_float[j])
corr_90
['loan_amnt', 'funded_amnt', 'loan_amnt', 'funded_amnt_inv', 'loan_amnt', 'installment', 'funded_amnt', 'funded_amnt_inv', 'funded_amnt', 'installment', 'funded_amnt_inv', 'installment', 'fico_range_low', 'fico_range_high', 'open_acc', 'num_op_rev_tl', 'open_acc', 'num_sats', 'revol_util', 'bc_util', 'out_prncp', 'out_prncp_inv', 'total_pymnt', 'total_pymnt_inv', 'total_pymnt', 'total_rec_prncp', 'total_pymnt_inv', 'total_rec_prncp', 'recoveries', 'collection_recovery_fee', 'last_fico_range_high', 'last_fico_range_low', 'annual_inc_joint', 'sec_app_fico_range_low', 'annual_inc_joint', 'sec_app_fico_range_high', 'dti_joint', 'sec_app_fico_range_low', 'dti_joint', 'sec_app_fico_range_high', 'dti_joint', 'sec_app_open_acc', 'dti_joint', 'sec_app_revol_util', 'acc_now_delinq', 'num_tl_30dpd', 'tot_cur_bal', 'avg_cur_bal', 'tot_cur_bal', 'tot_hi_cred_lim', 'bc_open_to_buy', 'total_bc_limit', 'bc_util', 'percent_bc_gt_75', 'num_actv_bc_tl', 'num_actv_rev_tl', 'num_actv_bc_tl', 'num_bc_sats', 'num_actv_bc_tl', 'num_rev_tl_bal_gt_0', 'num_actv_rev_tl', 'num_rev_tl_bal_gt_0', 'num_bc_tl', 'num_rev_accts', 'num_op_rev_tl', 'num_rev_tl_bal_gt_0', 'num_op_rev_tl', 'num_sats', 'total_bal_ex_mort', 'total_il_high_credit_limit', 'sec_app_fico_range_low', 'sec_app_fico_range_high', 'sec_app_fico_range_low', 'sec_app_open_acc', 'sec_app_fico_range_low', 'sec_app_revol_util', 'sec_app_fico_range_low', 'sec_app_num_rev_accts', 'sec_app_fico_range_high', 'sec_app_open_acc', 'sec_app_fico_range_high', 'sec_app_revol_util', 'sec_app_fico_range_high', 'sec_app_num_rev_accts', 'sec_app_open_acc', 'sec_app_num_rev_accts', 'deferral_term', 'hardship_length', 'deferral_term', 'hardship_dpd', 'deferral_term', 'hardship_payoff_balance_amount', 'hardship_amount', 'orig_projected_additional_accrued_interest', 'hardship_amount', 'hardship_payoff_balance_amount', 'hardship_length', 'hardship_dpd', 'hardship_length', 'hardship_payoff_balance_amount', 'orig_projected_additional_accrued_interest', 'hardship_payoff_balance_amount', 'settlement_amount', 'settlement_percentage', 'settlement_percentage', 'settlement_term']
corr_pair = [[corr_90[i],corr_90[i+1]] for i in range(0,len(corr_90)-1,2)]
corr_pair
[['loan_amnt', 'funded_amnt'], ['loan_amnt', 'funded_amnt_inv'], ['loan_amnt', 'installment'], ['funded_amnt', 'funded_amnt_inv'], ['funded_amnt', 'installment'], ['funded_amnt_inv', 'installment'], ['fico_range_low', 'fico_range_high'], ['open_acc', 'num_op_rev_tl'], ['open_acc', 'num_sats'], ['revol_util', 'bc_util'], ['out_prncp', 'out_prncp_inv'], ['total_pymnt', 'total_pymnt_inv'], ['total_pymnt', 'total_rec_prncp'], ['total_pymnt_inv', 'total_rec_prncp'], ['recoveries', 'collection_recovery_fee'], ['last_fico_range_high', 'last_fico_range_low'], ['annual_inc_joint', 'sec_app_fico_range_low'], ['annual_inc_joint', 'sec_app_fico_range_high'], ['dti_joint', 'sec_app_fico_range_low'], ['dti_joint', 'sec_app_fico_range_high'], ['dti_joint', 'sec_app_open_acc'], ['dti_joint', 'sec_app_revol_util'], ['acc_now_delinq', 'num_tl_30dpd'], ['tot_cur_bal', 'avg_cur_bal'], ['tot_cur_bal', 'tot_hi_cred_lim'], ['bc_open_to_buy', 'total_bc_limit'], ['bc_util', 'percent_bc_gt_75'], ['num_actv_bc_tl', 'num_actv_rev_tl'], ['num_actv_bc_tl', 'num_bc_sats'], ['num_actv_bc_tl', 'num_rev_tl_bal_gt_0'], ['num_actv_rev_tl', 'num_rev_tl_bal_gt_0'], ['num_bc_tl', 'num_rev_accts'], ['num_op_rev_tl', 'num_rev_tl_bal_gt_0'], ['num_op_rev_tl', 'num_sats'], ['total_bal_ex_mort', 'total_il_high_credit_limit'], ['sec_app_fico_range_low', 'sec_app_fico_range_high'], ['sec_app_fico_range_low', 'sec_app_open_acc'], ['sec_app_fico_range_low', 'sec_app_revol_util'], ['sec_app_fico_range_low', 'sec_app_num_rev_accts'], ['sec_app_fico_range_high', 'sec_app_open_acc'], ['sec_app_fico_range_high', 'sec_app_revol_util'], ['sec_app_fico_range_high', 'sec_app_num_rev_accts'], ['sec_app_open_acc', 'sec_app_num_rev_accts'], ['deferral_term', 'hardship_length'], ['deferral_term', 'hardship_dpd'], ['deferral_term', 'hardship_payoff_balance_amount'], ['hardship_amount', 'orig_projected_additional_accrued_interest'], ['hardship_amount', 'hardship_payoff_balance_amount'], ['hardship_length', 'hardship_dpd'], ['hardship_length', 'hardship_payoff_balance_amount'], ['orig_projected_additional_accrued_interest', 'hardship_payoff_balance_amount'], ['settlement_amount', 'settlement_percentage'], ['settlement_percentage', 'settlement_term']]
corr_pair_array = np.array(corr_pair)
list(corr_pair_array[:,1])
['funded_amnt', 'funded_amnt_inv', 'installment', 'funded_amnt_inv', 'installment', 'installment', 'fico_range_high', 'num_op_rev_tl', 'num_sats', 'bc_util', 'out_prncp_inv', 'total_pymnt_inv', 'total_rec_prncp', 'total_rec_prncp', 'collection_recovery_fee', 'last_fico_range_low', 'sec_app_fico_range_low', 'sec_app_fico_range_high', 'sec_app_fico_range_low', 'sec_app_fico_range_high', 'sec_app_open_acc', 'sec_app_revol_util', 'num_tl_30dpd', 'avg_cur_bal', 'tot_hi_cred_lim', 'total_bc_limit', 'percent_bc_gt_75', 'num_actv_rev_tl', 'num_bc_sats', 'num_rev_tl_bal_gt_0', 'num_rev_tl_bal_gt_0', 'num_rev_accts', 'num_rev_tl_bal_gt_0', 'num_sats', 'total_il_high_credit_limit', 'sec_app_fico_range_high', 'sec_app_open_acc', 'sec_app_revol_util', 'sec_app_num_rev_accts', 'sec_app_open_acc', 'sec_app_revol_util', 'sec_app_num_rev_accts', 'sec_app_num_rev_accts', 'hardship_length', 'hardship_dpd', 'hardship_payoff_balance_amount', 'orig_projected_additional_accrued_interest', 'hardship_payoff_balance_amount', 'hardship_dpd', 'hardship_payoff_balance_amount', 'hardship_payoff_balance_amount', 'settlement_percentage', 'settlement_term']
df_2.drop(list(corr_pair_array[:,1]),axis=1,inplace=True)
correlation_float = df_2.select_dtypes('float64').drop(['loan_status_binary'],axis=1).corr(method='pearson')
list(correlation_float[correlation_float.isnull().mean()==1].index)
['policy_code']
correlation_float.drop(index=['policy_code'],inplace=True)
list(correlation_float[correlation_float.isnull().mean()==1].index)
/Users/abhinavgairola/miniconda3/envs/raven_libraries/lib/python3.7/site-packages/ipykernel_launcher.py:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index.
[]
df_2.drop(columns=['policy_code'],inplace=True)
colored_dataframe = correlation_float.style.background_gradient(cmap='Reds')
colored_dataframe
/Users/abhinavgairola/miniconda3/envs/raven_libraries/lib/python3.7/site-packages/pandas/io/formats/style.py:1126: RuntimeWarning: All-NaN slice encountered /Users/abhinavgairola/miniconda3/envs/raven_libraries/lib/python3.7/site-packages/pandas/io/formats/style.py:1127: RuntimeWarning: All-NaN slice encountered /Users/abhinavgairola/miniconda3/envs/raven_libraries/lib/python3.7/site-packages/matplotlib/colors.py:527: RuntimeWarning: invalid value encountered in less
| loan_amnt | int_rate | annual_inc | dti | delinq_2yrs | fico_range_low | inq_last_6mths | mths_since_last_delinq | mths_since_last_record | open_acc | pub_rec | revol_bal | revol_util | total_acc | out_prncp | total_pymnt | total_rec_int | total_rec_late_fee | recoveries | last_pymnt_amnt | last_fico_range_high | collections_12_mths_ex_med | mths_since_last_major_derog | policy_code | annual_inc_joint | dti_joint | acc_now_delinq | tot_coll_amt | tot_cur_bal | open_acc_6m | open_act_il | open_il_12m | open_il_24m | mths_since_rcnt_il | total_bal_il | il_util | open_rv_12m | open_rv_24m | max_bal_bc | all_util | total_rev_hi_lim | inq_fi | total_cu_tl | inq_last_12m | acc_open_past_24mths | bc_open_to_buy | chargeoff_within_12_mths | delinq_amnt | mo_sin_old_il_acct | mo_sin_old_rev_tl_op | mo_sin_rcnt_rev_tl_op | mo_sin_rcnt_tl | mort_acc | mths_since_recent_bc | mths_since_recent_bc_dlq | mths_since_recent_inq | mths_since_recent_revol_delinq | num_accts_ever_120_pd | num_actv_bc_tl | num_bc_tl | num_il_tl | num_tl_120dpd_2m | num_tl_90g_dpd_24m | num_tl_op_past_12m | pct_tl_nvr_dlq | pub_rec_bankruptcies | tax_liens | total_bal_ex_mort | revol_bal_joint | sec_app_inq_last_6mths | sec_app_mort_acc | sec_app_open_act_il | sec_app_chargeoff_within_12_mths | sec_app_collections_12_mths_ex_med | sec_app_mths_since_last_major_derog | deferral_term | hardship_amount | hardship_last_payment_amount | settlement_amount | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| loan_amnt | 1.000000 | 0.098082 | 0.197246 | 0.043515 | -0.009277 | 0.110585 | -0.027840 | -0.007456 | 0.005807 | 0.182228 | -0.058771 | 0.316715 | 0.099026 | 0.199568 | 0.462180 | 0.668223 | 0.591755 | 0.075230 | 0.125173 | 0.322613 | 0.093664 | -0.021849 | 0.002483 | nan | 0.144212 | 0.115806 | -0.000528 | -0.004615 | 0.306154 | -0.018067 | 0.027957 | -0.001275 | 0.017866 | -0.010939 | 0.123811 | -0.066527 | -0.037639 | -0.028723 | 0.301756 | 0.002120 | 0.324118 | -0.002118 | 0.062101 | 0.007719 | -0.000910 | 0.202274 | -0.003796 | 0.000876 | 0.121871 | 0.163331 | 0.051917 | 0.027910 | 0.217007 | 0.035975 | -0.014878 | 0.001843 | -0.013058 | -0.052812 | 0.188675 | 0.189798 | 0.080394 | -0.001701 | -0.023194 | -0.026413 | 0.088315 | -0.083540 | 0.007553 | 0.273690 | 0.142843 | 0.044441 | 0.108097 | 0.084177 | 0.000363 | 0.002086 | 0.036875 | 0.020715 | 0.047746 | 0.038847 | 0.059371 |
| int_rate | 0.098082 | 1.000000 | -0.050582 | 0.124424 | 0.058908 | -0.415995 | 0.188398 | -0.029839 | -0.003898 | -0.010472 | 0.053381 | -0.028880 | 0.262549 | -0.040951 | 0.018586 | 0.099489 | 0.415898 | 0.069250 | 0.148350 | 0.077482 | -0.349210 | 0.018299 | -0.015919 | nan | 0.008044 | 0.049078 | 0.015562 | 0.003522 | -0.084677 | 0.112518 | 0.026706 | 0.131313 | 0.125565 | -0.070732 | 0.029101 | 0.110996 | 0.098806 | 0.105257 | -0.049629 | 0.239756 | -0.179680 | 0.112578 | 0.009144 | 0.137292 | 0.170754 | -0.293217 | 0.014187 | 0.004939 | -0.060930 | -0.132195 | -0.092014 | -0.110852 | -0.089455 | -0.074406 | -0.008518 | -0.136729 | -0.013006 | 0.051257 | 0.020161 | -0.083441 | 0.016363 | 0.005927 | 0.033069 | 0.179675 | -0.078506 | 0.056647 | 0.013887 | 0.006858 | 0.019964 | 0.033892 | -0.006679 | 0.021499 | 0.010811 | 0.018747 | 0.024257 | 0.033240 | 0.054381 | 0.034055 | 0.067767 |
| annual_inc | 0.197246 | -0.050582 | 1.000000 | -0.082604 | 0.026134 | 0.037009 | 0.020001 | -0.018530 | -0.014628 | 0.094377 | -0.002543 | 0.190760 | 0.028194 | 0.115271 | 0.082271 | 0.140322 | 0.083704 | 0.020607 | 0.010189 | 0.075503 | 0.036527 | -0.003484 | -0.005441 | nan | 0.012045 | -0.039775 | 0.007322 | -0.000224 | 0.252504 | 0.022368 | 0.043402 | 0.046745 | 0.061866 | -0.040577 | 0.113895 | -0.020376 | -0.001687 | -0.003636 | 0.146753 | 0.009989 | 0.184504 | 0.033290 | 0.027533 | 0.038422 | 0.039948 | 0.102331 | 0.004656 | 0.003848 | 0.072371 | 0.086826 | 0.018121 | -0.018442 | 0.134308 | 0.015786 | -0.011872 | -0.027008 | -0.011866 | 0.008240 | 0.076037 | 0.086344 | 0.068678 | 0.002738 | 0.003918 | 0.034117 | -0.004852 | -0.027128 | 0.024444 | 0.206539 | -0.007593 | -0.020559 | -0.016953 | -0.022342 | -0.005202 | -0.009038 | -0.018554 | 0.000277 | 0.005015 | 0.004901 | 0.003216 |
| dti | 0.043515 | 0.124424 | -0.082604 | 1.000000 | -0.012209 | -0.027913 | -0.012186 | 0.009131 | 0.023267 | 0.186060 | -0.026025 | 0.102095 | 0.114902 | 0.147283 | 0.065417 | -0.004508 | 0.061753 | 0.001691 | 0.022015 | -0.018317 | -0.033332 | -0.007024 | 0.011314 | nan | 0.174159 | 0.272326 | -0.000195 | -0.002809 | 0.021128 | 0.014780 | 0.132893 | 0.090870 | 0.128218 | -0.124471 | 0.144412 | -0.010413 | -0.010477 | 0.004322 | 0.075601 | 0.115233 | 0.060937 | 0.050512 | 0.076983 | 0.023485 | 0.084121 | -0.035610 | -0.003290 | -0.003739 | 0.037354 | 0.040858 | -0.007125 | -0.053873 | -0.009513 | 0.002712 | 0.005586 | 0.005874 | 0.004206 | -0.028910 | 0.109439 | 0.048478 | 0.143835 | -0.003302 | -0.013287 | 0.045030 | 0.064941 | -0.012374 | -0.020503 | 0.193084 | 0.202351 | 0.114665 | 0.168301 | 0.163370 | 0.020799 | 0.036829 | 0.102848 | 0.008892 | 0.010123 | 0.007360 | 0.018055 |
| delinq_2yrs | -0.009277 | 0.058908 | 0.026134 | -0.012209 | 1.000000 | -0.178910 | 0.024260 | -0.510423 | -0.027829 | 0.048956 | -0.021810 | -0.026778 | -0.000200 | 0.118554 | -0.029469 | 0.015036 | 0.031291 | 0.037438 | 0.016627 | -0.005746 | -0.095407 | 0.071874 | -0.340903 | nan | -0.007755 | -0.016945 | 0.116076 | 0.000141 | 0.056125 | 0.003262 | 0.044170 | -0.004375 | -0.015451 | 0.006475 | 0.035930 | -0.005845 | -0.014068 | -0.033550 | -0.039752 | 0.019021 | -0.047715 | 0.013833 | 0.014346 | 0.023154 | -0.050130 | -0.059511 | 0.140029 | 0.028506 | 0.078990 | 0.078289 | 0.025681 | 0.017499 | 0.074920 | 0.052037 | -0.355505 | -0.027413 | -0.415913 | 0.217031 | -0.037447 | 0.034198 | 0.082954 | 0.042290 | 0.652864 | -0.022004 | -0.439711 | -0.049301 | 0.011384 | 0.028043 | -0.019299 | -0.006185 | -0.004838 | -0.010619 | 0.002905 | 0.001511 | -0.002500 | 0.011962 | 0.008410 | 0.008358 | 0.006420 |
| fico_range_low | 0.110585 | -0.415995 | 0.037009 | -0.027913 | -0.178910 | 1.000000 | -0.093275 | 0.052479 | 0.061853 | 0.018406 | -0.188580 | 0.010711 | -0.476734 | 0.016193 | 0.120649 | 0.013465 | -0.113887 | -0.037091 | -0.057988 | 0.036567 | 0.397607 | -0.073766 | 0.027381 | nan | 0.091343 | 0.080722 | -0.038107 | -0.019209 | 0.114772 | -0.049246 | -0.003952 | -0.007784 | -0.009344 | -0.014719 | 0.006598 | -0.089875 | -0.093883 | -0.110218 | 0.035129 | -0.353667 | 0.278390 | -0.056420 | 0.005386 | -0.096295 | -0.104138 | 0.498705 | -0.053945 | -0.011029 | 0.014945 | 0.123775 | 0.101791 | 0.067491 | 0.091636 | 0.076042 | 0.002756 | 0.069530 | 0.015574 | -0.195481 | -0.111754 | 0.048662 | -0.015162 | -0.015469 | -0.102364 | -0.094079 | 0.301095 | -0.196333 | -0.059252 | 0.021718 | 0.084799 | 0.046303 | 0.078957 | 0.075924 | 0.010774 | 0.010995 | 0.017969 | -0.025414 | -0.019788 | -0.016608 | -0.027076 |
| inq_last_6mths | -0.027840 | 0.188398 | 0.020001 | -0.012186 | 0.024260 | -0.093275 | 1.000000 | 0.008490 | -0.040974 | 0.138064 | 0.064950 | -0.010130 | -0.078497 | 0.154855 | -0.089935 | 0.025297 | 0.049036 | 0.018444 | 0.051197 | 0.033209 | -0.122756 | 0.011227 | -0.011402 | nan | -0.040810 | -0.044251 | -0.001463 | 0.004122 | 0.029239 | 0.301892 | 0.026791 | 0.119992 | 0.101029 | -0.063832 | 0.042730 | 0.057365 | 0.233357 | 0.206671 | -0.041078 | -0.024956 | 0.019978 | 0.152191 | 0.027344 | 0.337480 | 0.270961 | 0.013931 | 0.011812 | 0.001472 | 0.011956 | -0.004115 | -0.181483 | -0.216743 | 0.045206 | -0.125462 | 0.017430 | -0.530440 | 0.017124 | 0.047535 | 0.074155 | 0.135239 | 0.066432 | 0.000843 | 0.028843 | 0.317134 | -0.027086 | 0.073674 | 0.013747 | 0.036024 | -0.039425 | 0.017500 | -0.032671 | -0.031381 | -0.004106 | -0.006117 | -0.017927 | 0.006076 | 0.007138 | 0.005893 | 0.016880 |
| mths_since_last_delinq | -0.007456 | -0.029839 | -0.018530 | 0.009131 | -0.510423 | 0.052479 | 0.008490 | 1.000000 | -0.016938 | -0.025063 | 0.053862 | -0.009762 | 0.003368 | -0.030620 | 0.019508 | -0.025082 | -0.030050 | -0.027322 | -0.010519 | 0.004166 | 0.049419 | -0.033102 | 0.494530 | nan | 0.001251 | 0.007705 | -0.129236 | 0.006228 | -0.049246 | 0.026035 | -0.012325 | 0.024574 | 0.030150 | -0.009138 | -0.005613 | 0.027116 | 0.036913 | 0.052035 | 0.002934 | 0.010053 | -0.006316 | 0.005806 | -0.003410 | 0.006320 | 0.080344 | 0.001554 | -0.096586 | -0.030407 | 0.001019 | -0.029417 | -0.042835 | -0.040986 | -0.044425 | -0.057820 | 0.508250 | -0.002560 | 0.679521 | 0.007393 | 0.020585 | -0.000505 | -0.008564 | -0.049328 | -0.211626 | 0.061006 | 0.143758 | 0.068626 | 0.002900 | -0.015190 | 0.007708 | 0.002045 | 0.002707 | 0.003496 | -0.004433 | -0.003123 | 0.019968 | -0.005115 | -0.004028 | -0.003604 | -0.003586 |
| mths_since_last_record | 0.005807 | -0.003898 | -0.014628 | 0.023267 | -0.027829 | 0.061853 | -0.040974 | -0.016938 | 1.000000 | 0.008790 | -0.160380 | -0.002737 | 0.012478 | -0.060799 | 0.043994 | -0.030332 | -0.020932 | -0.016738 | -0.010967 | -0.001235 | 0.032291 | -0.009550 | -0.006617 | nan | 0.020895 | 0.026374 | -0.007871 | -0.005856 | 0.000914 | -0.020229 | -0.001359 | -0.002969 | 0.005427 | -0.009207 | -0.001102 | -0.014211 | -0.034282 | -0.038498 | -0.000036 | -0.012707 | 0.004679 | -0.009628 | 0.001381 | -0.023160 | -0.034106 | 0.003619 | -0.011095 | -0.005058 | -0.028244 | -0.054218 | 0.010135 | 0.012580 | -0.045251 | 0.009797 | -0.027069 | 0.024351 | -0.030939 | -0.062473 | 0.006449 | -0.070440 | -0.016152 | -0.004764 | -0.029261 | -0.037421 | 0.080401 | 0.158202 | -0.281507 | -0.004632 | 0.019844 | 0.012532 | 0.012706 | 0.017240 | 0.002485 | 0.004024 | 0.004267 | -0.006186 | -0.003760 | -0.004102 | -0.004351 |
| open_acc | 0.182228 | -0.010472 | 0.094377 | 0.186060 | 0.048956 | 0.018406 | 0.138064 | -0.025063 | 0.008790 | 1.000000 | -0.014849 | 0.237096 | -0.134523 | 0.717911 | 0.065874 | 0.131431 | 0.106443 | 0.004622 | 0.033666 | 0.067345 | 0.006265 | 0.007967 | 0.006488 | nan | 0.004749 | 0.004073 | 0.016877 | 0.000775 | 0.253011 | 0.230403 | 0.424370 | 0.147794 | 0.206865 | -0.132822 | 0.283744 | 0.096352 | 0.287677 | 0.372359 | 0.098415 | -0.004955 | 0.392624 | 0.096810 | 0.090364 | 0.148988 | 0.489835 | 0.307870 | 0.006394 | 0.003078 | 0.141980 | 0.143674 | -0.235478 | -0.231656 | 0.133260 | -0.206842 | -0.007896 | -0.100140 | -0.029382 | 0.023124 | 0.554703 | 0.537003 | 0.393398 | 0.004030 | 0.010650 | 0.367584 | 0.109123 | -0.016406 | -0.005172 | 0.402391 | 0.027442 | -0.002424 | 0.003837 | 0.004732 | -0.003578 | -0.004543 | -0.010295 | 0.009410 | 0.012393 | 0.010295 | 0.023260 |
| pub_rec | -0.058771 | 0.053381 | -0.002543 | -0.026025 | -0.021810 | -0.188580 | 0.064950 | 0.053862 | -0.160380 | -0.014849 | 1.000000 | -0.085610 | -0.051783 | 0.003846 | -0.050951 | -0.024946 | -0.006526 | 0.006809 | 0.007859 | -0.007950 | -0.075679 | 0.009894 | 0.038187 | nan | -0.019710 | -0.018534 | 0.000788 | 0.005943 | -0.062691 | 0.045031 | -0.020467 | 0.027493 | 0.031424 | -0.013098 | -0.013009 | 0.016822 | 0.063084 | 0.078517 | -0.078578 | -0.001639 | -0.097482 | 0.048665 | 0.001342 | 0.066867 | 0.095035 | -0.084030 | -0.005005 | 0.004111 | 0.033138 | 0.038086 | -0.062693 | -0.056159 | -0.011443 | -0.046879 | 0.043748 | -0.051247 | 0.046190 | 0.011634 | -0.032539 | -0.005783 | -0.014798 | 0.003031 | -0.003588 | 0.082691 | -0.008904 | 0.659178 | 0.697894 | -0.054381 | -0.027737 | -0.008395 | -0.018577 | -0.018824 | -0.003984 | -0.004736 | -0.012471 | 0.008697 | 0.006226 | 0.005102 | 0.001514 |
| revol_bal | 0.316715 | -0.028880 | 0.190760 | 0.102095 | -0.026778 | 0.010711 | -0.010130 | -0.009762 | -0.002737 | 0.237096 | -0.085610 | 1.000000 | 0.244550 | 0.204725 | 0.121616 | 0.241590 | 0.177758 | 0.017758 | 0.022149 | 0.102459 | 0.053386 | -0.024740 | 0.001605 | nan | 0.036131 | 0.014355 | 0.000952 | -0.007009 | 0.435580 | -0.016330 | 0.015243 | -0.019658 | -0.007107 | 0.006492 | 0.080696 | -0.068859 | -0.009932 | -0.004606 | 0.448618 | 0.095181 | 0.795467 | -0.034249 | 0.040194 | -0.020073 | -0.010744 | 0.163242 | -0.010372 | 0.003822 | 0.101938 | 0.226684 | 0.021904 | 0.022872 | 0.211464 | 0.026708 | -0.013419 | 0.010184 | -0.018379 | -0.077360 | 0.314503 | 0.234385 | 0.027345 | -0.002839 | -0.032238 | -0.023464 | 0.112433 | -0.108813 | -0.009495 | 0.502934 | 0.073569 | -0.005325 | 0.027625 | 0.002940 | -0.004484 | -0.008206 | -0.012986 | -0.000907 | 0.005624 | 0.004560 | 0.012458 |
| revol_util | 0.099026 | 0.262549 | 0.028194 | 0.114902 | -0.000200 | -0.476734 | -0.078497 | 0.003368 | 0.012478 | -0.134523 | -0.051783 | 0.244550 | 1.000000 | -0.093106 | -0.040338 | 0.158770 | 0.225800 | 0.033404 | 0.049614 | 0.017103 | -0.192861 | -0.034890 | -0.002547 | nan | -0.019968 | -0.011972 | -0.020239 | -0.008845 | 0.086464 | -0.150539 | 0.036952 | -0.074223 | -0.056991 | 0.050436 | 0.024427 | -0.048905 | -0.161647 | -0.176753 | 0.257783 | 0.526036 | -0.131889 | -0.067437 | 0.022883 | -0.100607 | -0.217423 | -0.472669 | -0.010939 | -0.004238 | 0.067604 | 0.021537 | 0.173055 | 0.158714 | 0.037770 | 0.141543 | 0.005923 | 0.085834 | 0.012355 | -0.019756 | 0.103948 | -0.122137 | 0.021434 | -0.007999 | -0.004714 | -0.211007 | -0.029578 | -0.073827 | -0.002836 | 0.124504 | 0.004104 | -0.034671 | -0.011390 | -0.022600 | -0.010452 | -0.013609 | -0.018487 | 0.013708 | 0.013961 | 0.011591 | 0.022933 |
| total_acc | 0.199568 | -0.040951 | 0.115271 | 0.147283 | 0.118554 | 0.016193 | 0.154855 | -0.030620 | -0.060799 | 0.717911 | 0.003846 | 0.204725 | -0.093106 | 1.000000 | 0.007309 | 0.192894 | 0.120840 | 0.008361 | 0.044543 | 0.134091 | 0.033833 | 0.005667 | -0.022501 | nan | -0.000647 | -0.007606 | 0.025649 | 0.005644 | 0.317723 | 0.205187 | 0.314594 | 0.204098 | 0.279397 | -0.151313 | 0.332353 | 0.085100 | 0.195670 | 0.246088 | 0.107755 | 0.006651 | 0.314867 | 0.135810 | 0.231469 | 0.169766 | 0.429439 | 0.234996 | 0.040991 | 0.005723 | 0.328376 | 0.276759 | -0.169534 | -0.212754 | 0.364029 | -0.123603 | 0.003447 | -0.121115 | -0.012768 | 0.144949 | 0.310379 | 0.619712 | 0.679999 | 0.009295 | 0.067703 | 0.329007 | 0.020832 | 0.022959 | -0.015105 | 0.435480 | 0.015306 | -0.008357 | 0.021639 | -0.001813 | -0.004953 | -0.009164 | -0.012431 | 0.009111 | 0.012185 | 0.010638 | 0.028617 |
| out_prncp | 0.462180 | 0.018586 | 0.082271 | 0.065417 | -0.029469 | 0.120649 | -0.089935 | 0.019508 | 0.043994 | 0.065874 | -0.050951 | 0.121616 | -0.040338 | 0.007309 | 1.000000 | -0.213036 | 0.113581 | 0.000266 | -0.110173 | -0.266422 | 0.173957 | -0.005868 | 0.017396 | nan | 0.254433 | 0.241931 | -0.018923 | -0.003683 | 0.120461 | -0.048533 | 0.017290 | -0.033377 | -0.026529 | 0.006515 | 0.072302 | -0.069017 | -0.059925 | -0.060851 | 0.188160 | -0.032966 | 0.166715 | -0.008867 | 0.025390 | -0.039722 | -0.036855 | 0.156464 | -0.008875 | -0.004184 | 0.038966 | 0.045116 | 0.061467 | 0.044814 | 0.016807 | 0.035591 | -0.001672 | 0.038815 | 0.007818 | -0.028499 | 0.074031 | -0.005218 | 0.019109 | -0.008827 | -0.022712 | -0.046332 | 0.039407 | -0.030017 | -0.024566 | 0.127442 | 0.258892 | 0.122532 | 0.200253 | 0.189630 | 0.018132 | 0.032139 | 0.111039 | 0.003149 | 0.021302 | 0.014218 | -0.052770 |
| total_pymnt | 0.668223 | 0.099489 | 0.140322 | -0.004508 | 0.015036 | 0.013465 | 0.025297 | -0.025082 | -0.030332 | 0.131431 | -0.024946 | 0.241590 | 0.158770 | 0.192894 | -0.213036 | 1.000000 | 0.693782 | 0.066402 | 0.000917 | 0.580266 | 0.131406 | -0.020395 | -0.011780 | nan | -0.046388 | -0.064919 | 0.015261 | -0.001910 | 0.231367 | 0.006151 | 0.017255 | 0.013231 | 0.027022 | -0.009439 | 0.071232 | -0.020860 | -0.002947 | 0.003451 | 0.169632 | 0.037455 | 0.202242 | -0.004933 | 0.038944 | 0.024700 | -0.002721 | 0.072109 | 0.002493 | 0.003659 | 0.103989 | 0.144128 | 0.020415 | 0.008866 | 0.220997 | 0.025673 | -0.015187 | -0.013978 | -0.021104 | -0.032542 | 0.138406 | 0.190345 | 0.062986 | 0.004726 | -0.006661 | -0.015762 | 0.053558 | -0.069756 | 0.027912 | 0.186851 | -0.051991 | -0.051633 | -0.042511 | -0.058233 | -0.014472 | -0.023682 | -0.046900 | 0.015009 | 0.027494 | 0.025387 | 0.016648 |
| total_rec_int | 0.591755 | 0.415898 | 0.083704 | 0.061753 | 0.031291 | -0.113887 | 0.049036 | -0.030050 | -0.020932 | 0.106443 | -0.006526 | 0.177758 | 0.225800 | 0.120840 | 0.113581 | 0.693782 | 1.000000 | 0.123901 | 0.077663 | 0.100263 | -0.064653 | -0.009814 | -0.014068 | nan | -0.001385 | -0.000515 | 0.016437 | -0.001913 | 0.136676 | 0.011842 | 0.027658 | 0.021231 | 0.032228 | -0.014885 | 0.065898 | -0.000934 | 0.004152 | 0.011140 | 0.120973 | 0.097418 | 0.090145 | 0.007873 | 0.022730 | 0.029658 | 0.018871 | -0.055307 | 0.004673 | 0.003429 | 0.078078 | 0.081102 | 0.008620 | -0.006380 | 0.124252 | 0.017621 | -0.016642 | -0.030004 | -0.022103 | -0.013253 | 0.130315 | 0.096402 | 0.054832 | 0.004102 | 0.003484 | 0.008746 | 0.013737 | -0.042622 | 0.027680 | 0.153866 | -0.002145 | -0.014344 | -0.011201 | -0.011990 | -0.005200 | -0.007863 | -0.014626 | 0.059278 | 0.087807 | 0.070117 | 0.064289 |
| total_rec_late_fee | 0.075230 | 0.069250 | 0.020607 | 0.001691 | 0.037438 | -0.037091 | 0.018444 | -0.027322 | -0.016738 | 0.004622 | 0.006809 | 0.017758 | 0.033404 | 0.008361 | 0.000266 | 0.066402 | 0.123901 | 1.000000 | 0.069397 | -0.029809 | -0.114280 | 0.004772 | -0.009627 | nan | 0.007767 | 0.004868 | 0.007507 | -0.000318 | 0.027190 | 0.010431 | 0.010743 | 0.015884 | 0.017256 | -0.007797 | 0.019909 | 0.010464 | 0.002519 | 0.002235 | 0.007670 | 0.027729 | -0.000933 | 0.013817 | 0.012270 | 0.022002 | 0.014134 | -0.022493 | 0.003155 | 0.001686 | 0.007000 | 0.000637 | 0.001256 | -0.008215 | 0.006366 | 0.002300 | -0.017257 | -0.017632 | -0.020072 | 0.009550 | 0.001645 | -0.006475 | 0.018215 | 0.001826 | 0.010429 | 0.013386 | -0.030794 | -0.009321 | 0.017068 | 0.030491 | 0.001903 | 0.009834 | -0.003022 | 0.004636 | 0.003325 | 0.005267 | 0.002976 | 0.125376 | 0.133136 | 0.125324 | 0.066643 |
| recoveries | 0.125173 | 0.148350 | 0.010189 | 0.022015 | 0.016627 | -0.057988 | 0.051197 | -0.010519 | -0.010967 | 0.033666 | 0.007859 | 0.022149 | 0.049614 | 0.044543 | -0.110173 | 0.000917 | 0.077663 | 0.069397 | 1.000000 | -0.090439 | -0.286668 | 0.002156 | -0.004901 | nan | -0.022414 | -0.021929 | 0.006719 | -0.000495 | 0.009437 | 0.027111 | 0.007499 | 0.028455 | 0.030737 | -0.016606 | 0.014287 | 0.016228 | 0.022246 | 0.028017 | 0.008000 | 0.026553 | 0.000021 | 0.016472 | 0.009738 | 0.028908 | 0.060882 | -0.030414 | 0.002965 | 0.001770 | 0.007533 | -0.000392 | -0.028985 | -0.034536 | 0.015154 | -0.024313 | -0.003900 | -0.035682 | -0.007312 | 0.004189 | 0.026760 | 0.033903 | 0.025363 | 0.001681 | 0.005486 | 0.051714 | 0.000805 | 0.002106 | 0.006221 | 0.029981 | -0.021800 | -0.010808 | -0.020006 | -0.018807 | -0.002604 | -0.004114 | -0.012979 | 0.018920 | 0.028830 | 0.020079 | 0.467846 |
| last_pymnt_amnt | 0.322613 | 0.077482 | 0.075503 | -0.018317 | -0.005746 | 0.036567 | 0.033209 | 0.004166 | -0.001235 | 0.067345 | -0.007950 | 0.102459 | 0.017103 | 0.134091 | -0.266422 | 0.580266 | 0.100263 | -0.029809 | -0.090439 | 1.000000 | 0.153641 | -0.012695 | 0.005022 | nan | -0.016234 | -0.027899 | 0.004555 | 0.000308 | 0.153460 | 0.027041 | 0.008211 | 0.043004 | 0.056275 | -0.034024 | 0.046771 | 0.011988 | 0.013790 | 0.018420 | 0.074831 | 0.001114 | 0.108809 | 0.026976 | 0.048054 | 0.043429 | 0.059037 | 0.069826 | 0.001901 | 0.001436 | 0.046075 | 0.054982 | -0.015064 | -0.033944 | 0.154964 | -0.012101 | 0.003946 | -0.036035 | 0.003570 | -0.010915 | 0.030368 | 0.110171 | 0.061123 | 0.002787 | -0.007012 | 0.044704 | 0.042111 | -0.011111 | -0.000494 | 0.098089 | -0.019991 | -0.020338 | -0.009593 | -0.024651 | -0.007007 | -0.012024 | -0.019600 | -0.024967 | -0.015056 | -0.015116 | -0.046265 |
| last_fico_range_high | 0.093664 | -0.349210 | 0.036527 | -0.033332 | -0.095407 | 0.397607 | -0.122756 | 0.049419 | 0.032291 | 0.006265 | -0.075679 | 0.053386 | -0.192861 | 0.033833 | 0.173957 | 0.131406 | -0.064653 | -0.114280 | -0.286668 | 0.153641 | 1.000000 | -0.033859 | 0.029182 | nan | 0.064478 | 0.056517 | -0.013297 | -0.005348 | 0.092364 | -0.079643 | -0.012904 | -0.055372 | -0.056924 | 0.029807 | -0.006959 | -0.066962 | -0.089716 | -0.105819 | 0.073559 | -0.163132 | 0.175649 | -0.064966 | 0.004934 | -0.096952 | -0.143507 | 0.259335 | -0.019233 | -0.005078 | 0.045935 | 0.130261 | 0.096843 | 0.089757 | 0.098446 | 0.085956 | 0.020690 | 0.090530 | 0.029516 | -0.074444 | -0.038117 | 0.048409 | -0.010546 | -0.005534 | -0.051211 | -0.129929 | 0.132733 | -0.071058 | -0.026947 | 0.022430 | 0.058734 | 0.023200 | 0.057490 | 0.048943 | 0.004499 | 0.003235 | 0.020721 | -0.072047 | -0.053573 | -0.048189 | -0.126781 |
| collections_12_mths_ex_med | -0.021849 | 0.018299 | -0.003484 | -0.007024 | 0.071874 | -0.073766 | 0.011227 | -0.033102 | -0.009550 | 0.007967 | 0.009894 | -0.024740 | -0.034890 | 0.005667 | -0.005868 | -0.020395 | -0.009814 | 0.004772 | 0.002156 | -0.012695 | -0.033859 | 1.000000 | -0.104434 | nan | -0.009922 | -0.010303 | 0.020767 | 0.016775 | -0.013193 | 0.008753 | 0.002962 | -0.000180 | -0.002939 | 0.000400 | -0.002444 | 0.002207 | 0.014971 | 0.017049 | -0.030033 | -0.013755 | -0.021699 | 0.007354 | -0.004723 | 0.012988 | 0.015796 | -0.015399 | 0.043681 | 0.006599 | 0.008943 | -0.009409 | -0.011896 | -0.009202 | -0.013218 | -0.008505 | -0.006123 | -0.010236 | -0.007303 | 0.048277 | -0.005817 | -0.011260 | 0.007777 | 0.002919 | 0.107325 | 0.013428 | -0.047912 | -0.003728 | 0.010757 | -0.013295 | -0.011612 | -0.004201 | -0.009409 | -0.007426 | -0.000611 | 0.004784 | -0.002350 | 0.004608 | 0.002498 | 0.002887 | -0.001217 |
| mths_since_last_major_derog | 0.002483 | -0.015919 | -0.005441 | 0.011314 | -0.340903 | 0.027381 | -0.011402 | 0.494530 | -0.006617 | 0.006488 | 0.038187 | 0.001605 | -0.002547 | -0.022501 | 0.017396 | -0.011780 | -0.014068 | -0.009627 | -0.004901 | 0.005022 | 0.029182 | -0.104434 | 1.000000 | nan | 0.007336 | 0.009760 | -0.074731 | 0.005271 | -0.014955 | 0.009834 | -0.012538 | 0.014505 | 0.026432 | -0.012514 | -0.006472 | 0.004003 | 0.016704 | 0.036972 | 0.008813 | -0.001782 | 0.008417 | 0.006930 | -0.000355 | 0.000917 | 0.066191 | 0.011250 | -0.195992 | -0.055112 | -0.006603 | -0.004206 | -0.034629 | -0.033364 | -0.029380 | -0.044427 | 0.324736 | 0.007521 | 0.349950 | -0.065735 | 0.023308 | 0.000906 | -0.017339 | -0.089404 | -0.451924 | 0.034201 | 0.088492 | 0.041532 | 0.006055 | -0.007266 | 0.008069 | 0.003473 | 0.006788 | 0.005867 | -0.004994 | -0.001631 | 0.032754 | -0.002477 | -0.001594 | -0.001905 | 0.000700 |
| annual_inc_joint | 0.144212 | 0.008044 | 0.012045 | 0.174159 | -0.007755 | 0.091343 | -0.040810 | 0.001251 | 0.020895 | 0.004749 | -0.019710 | 0.036131 | -0.019968 | -0.000647 | 0.254433 | -0.046388 | -0.001385 | 0.007767 | -0.022414 | -0.016234 | 0.064478 | -0.009922 | 0.007336 | nan | 1.000000 | 0.754730 | -0.007198 | -0.001890 | 0.102809 | -0.014465 | 0.015220 | 0.004942 | 0.001908 | 0.002225 | 0.056450 | -0.011216 | -0.040702 | -0.046755 | 0.051689 | -0.005053 | 0.048283 | 0.013967 | 0.045052 | 0.003187 | -0.018429 | 0.041610 | -0.006793 | -0.001905 | 0.018655 | 0.029400 | 0.036263 | 0.017289 | 0.049842 | 0.036155 | -0.003187 | 0.010529 | 0.000117 | -0.013922 | -0.027847 | -0.036074 | 0.012500 | -0.003618 | -0.011025 | -0.017016 | 0.011527 | -0.007287 | -0.014029 | 0.063929 | 0.771902 | 0.437776 | 0.607645 | 0.585813 | 0.084193 | 0.134355 | 0.378841 | -0.001180 | 0.005248 | 0.002525 | -0.009731 |
| dti_joint | 0.115806 | 0.049078 | -0.039775 | 0.272326 | -0.016945 | 0.080722 | -0.044251 | 0.007705 | 0.026374 | 0.004073 | -0.018534 | 0.014355 | -0.011972 | -0.007606 | 0.241931 | -0.064919 | -0.000515 | 0.004868 | -0.021929 | -0.027899 | 0.056517 | -0.010303 | 0.009760 | nan | 0.754730 | 1.000000 | -0.008095 | -0.001954 | 0.051397 | -0.019478 | 0.024462 | 0.012026 | 0.013915 | -0.011668 | 0.053174 | -0.007603 | -0.045312 | -0.048463 | 0.020739 | 0.014707 | 0.019113 | 0.020772 | 0.054691 | 0.002368 | -0.017557 | 0.013869 | -0.007172 | -0.002577 | 0.009899 | 0.015481 | 0.035709 | 0.017507 | 0.025985 | 0.035135 | 0.000119 | 0.015018 | 0.004030 | -0.019526 | -0.032077 | -0.050765 | 0.017619 | -0.004027 | -0.013985 | -0.019992 | 0.023176 | -0.001847 | -0.016761 | 0.050834 | 0.756232 | 0.477577 | 0.574774 | 0.651947 | 0.095488 | 0.150465 | 0.399583 | 0.001002 | 0.008346 | 0.004642 | -0.008555 |
| acc_now_delinq | -0.000528 | 0.015562 | 0.007322 | -0.000195 | 0.116076 | -0.038107 | -0.001463 | -0.129236 | -0.007871 | 0.016877 | 0.000788 | 0.000952 | -0.020239 | 0.025649 | -0.018923 | 0.015261 | 0.016437 | 0.007507 | 0.006719 | 0.004555 | -0.013297 | 0.020767 | -0.074731 | nan | -0.007198 | -0.008095 | 1.000000 | -0.000050 | 0.019997 | -0.002665 | 0.003664 | -0.002829 | -0.003087 | 0.000480 | 0.003306 | -0.005755 | -0.001780 | -0.001411 | -0.002453 | -0.010364 | 0.007993 | -0.002727 | 0.001735 | -0.001586 | -0.003258 | 0.008684 | 0.037628 | 0.170756 | 0.015045 | 0.025536 | 0.001288 | 0.000791 | 0.023485 | 0.008219 | -0.076328 | 0.001432 | -0.097465 | 0.020516 | -0.005806 | 0.015446 | 0.007852 | 0.383466 | 0.054663 | -0.004853 | -0.043624 | -0.008813 | 0.007868 | 0.006946 | -0.008009 | -0.005211 | -0.006577 | -0.006586 | -0.000756 | -0.001594 | -0.004634 | 0.000799 | 0.000403 | 0.000746 | 0.002562 |
| tot_coll_amt | -0.004615 | 0.003522 | -0.000224 | -0.002809 | 0.000141 | -0.019209 | 0.004122 | 0.006228 | -0.005856 | 0.000775 | 0.005943 | -0.007009 | -0.008845 | 0.005644 | -0.003683 | -0.001910 | -0.001913 | -0.000318 | -0.000495 | 0.000308 | -0.005348 | 0.016775 | 0.005271 | nan | -0.001890 | -0.001954 | -0.000050 | 1.000000 | -0.002350 | 0.003972 | -0.001206 | 0.001016 | 0.000744 | 0.001519 | -0.000334 | 0.001851 | 0.005433 | 0.006431 | -0.007470 | -0.002202 | -0.006770 | 0.004353 | -0.001212 | 0.004667 | 0.005637 | -0.004845 | 0.001930 | 0.000400 | 0.003957 | 0.005625 | -0.003781 | -0.003475 | 0.001339 | -0.001693 | 0.011116 | -0.004602 | 0.010445 | 0.029254 | -0.003956 | 0.003036 | 0.002438 | 0.000452 | 0.001412 | 0.005750 | -0.015492 | 0.000103 | 0.003100 | -0.002663 | -0.002710 | -0.000792 | -0.002010 | -0.001696 | -0.000137 | 0.000467 | 0.000157 | 0.000293 | 0.000171 | 0.000226 | -0.000426 |
| tot_cur_bal | 0.306154 | -0.084677 | 0.252504 | 0.021128 | 0.056125 | 0.114772 | 0.029239 | -0.049246 | 0.000914 | 0.253011 | -0.062691 | 0.435580 | 0.086464 | 0.317723 | 0.120461 | 0.231367 | 0.136676 | 0.027190 | 0.009437 | 0.153460 | 0.092364 | -0.013193 | -0.014955 | nan | 0.102809 | 0.051397 | 0.019997 | -0.002350 | 1.000000 | 0.073928 | 0.142916 | 0.111821 | 0.141144 | -0.094313 | 0.330386 | 0.033497 | -0.017374 | -0.029555 | 0.275682 | 0.084916 | 0.400857 | 0.094672 | 0.105176 | 0.106811 | 0.111407 | 0.163049 | 0.005120 | 0.018324 | 0.176700 | 0.186017 | 0.031700 | -0.079467 | 0.538517 | 0.044737 | -0.021464 | -0.055889 | -0.025167 | 0.015067 | 0.108827 | 0.144420 | 0.221976 | 0.006239 | 0.007683 | 0.097313 | 0.010765 | -0.089454 | -0.000533 | 0.529959 | 0.099379 | 0.022785 | 0.108968 | 0.051196 | -0.001828 | -0.002699 | 0.020882 | -0.001864 | 0.006370 | 0.004971 | 0.004492 |
| open_acc_6m | -0.018067 | 0.112518 | 0.022368 | 0.014780 | 0.003262 | -0.049246 | 0.301892 | 0.026035 | -0.020229 | 0.230403 | 0.045031 | -0.016330 | -0.150539 | 0.205187 | -0.048533 | 0.006151 | 0.011842 | 0.010431 | 0.027111 | 0.027041 | -0.079643 | 0.008753 | 0.009834 | nan | -0.014465 | -0.019478 | -0.002665 | 0.003972 | 0.073928 | 1.000000 | 0.082732 | 0.384711 | 0.299301 | -0.191141 | 0.116788 | 0.168492 | 0.623835 | 0.484832 | -0.087043 | -0.048107 | 0.065433 | 0.166423 | 0.093383 | 0.323632 | 0.457063 | 0.093045 | 0.002747 | -0.002194 | 0.012456 | -0.010326 | -0.295497 | -0.385483 | 0.047711 | -0.203359 | 0.024360 | -0.234572 | 0.026015 | 0.055843 | 0.105061 | 0.154252 | 0.107653 | -0.002592 | 0.009464 | 0.598675 | 0.001170 | 0.047483 | 0.011207 | 0.073372 | -0.020258 | 0.021425 | -0.009168 | -0.012526 | -0.003495 | -0.002332 | -0.000673 | 0.009236 | 0.009791 | 0.007828 | 0.017482 |
| open_act_il | 0.027957 | 0.026706 | 0.043402 | 0.132893 | 0.044170 | -0.003952 | 0.026791 | -0.012325 | -0.001359 | 0.424370 | -0.020467 | 0.015243 | 0.036952 | 0.314594 | 0.017290 | 0.017255 | 0.027658 | 0.010743 | 0.007499 | 0.008211 | -0.012904 | 0.002962 | -0.012538 | nan | 0.015220 | 0.024462 | 0.003664 | -0.001206 | 0.142916 | 0.082732 | 1.000000 | 0.274393 | 0.365803 | -0.225974 | 0.555103 | 0.282875 | -0.019292 | -0.017898 | 0.032125 | 0.360232 | 0.006929 | 0.101674 | 0.091732 | 0.081545 | 0.135914 | -0.009820 | 0.000496 | -0.002005 | 0.127323 | -0.053700 | -0.006572 | -0.084694 | -0.002429 | -0.010106 | -0.005566 | -0.028485 | -0.005276 | 0.072552 | 0.003730 | -0.005681 | 0.519613 | 0.000628 | 0.043789 | 0.099281 | -0.003597 | -0.021386 | -0.008704 | 0.397954 | 0.017154 | -0.002054 | 0.004663 | 0.045939 | -0.002318 | -0.002271 | 0.001351 | 0.010522 | 0.010989 | 0.008128 | 0.003573 |
| open_il_12m | -0.001275 | 0.131313 | 0.046745 | 0.090870 | -0.004375 | -0.007784 | 0.119992 | 0.024574 | -0.002969 | 0.147794 | 0.027493 | -0.019658 | -0.074223 | 0.204098 | -0.033377 | 0.013231 | 0.021231 | 0.015884 | 0.028455 | 0.043004 | -0.055372 | -0.000180 | 0.014505 | nan | 0.004942 | 0.012026 | -0.002829 | 0.001016 | 0.111821 | 0.384711 | 0.274393 | 1.000000 | 0.747459 | -0.433748 | 0.301158 | 0.322066 | 0.072657 | 0.076026 | -0.053743 | 0.178771 | 0.008496 | 0.298148 | 0.207740 | 0.362914 | 0.357096 | 0.022781 | -0.000206 | -0.002705 | 0.029942 | -0.006454 | -0.048871 | -0.245772 | 0.062588 | -0.034510 | 0.022457 | -0.153202 | 0.025747 | 0.032506 | -0.024332 | 0.030740 | 0.270786 | -0.002332 | -0.000723 | 0.459989 | 0.019323 | 0.033850 | 0.005013 | 0.202664 | 0.005731 | 0.015355 | 0.008100 | 0.018050 | -0.001680 | -0.000099 | 0.004545 | 0.012161 | 0.014581 | 0.010353 | 0.016482 |
| open_il_24m | 0.017866 | 0.125565 | 0.061866 | 0.128218 | -0.015451 | -0.009344 | 0.101029 | 0.030150 | 0.005427 | 0.206865 | 0.031424 | -0.007107 | -0.056991 | 0.279397 | -0.026529 | 0.027022 | 0.032228 | 0.017256 | 0.030737 | 0.056275 | -0.056924 | -0.002939 | 0.026432 | nan | 0.001908 | 0.013915 | -0.003087 | 0.000744 | 0.141144 | 0.299301 | 0.365803 | 0.747459 | 1.000000 | -0.477143 | 0.374235 | 0.293599 | 0.063816 | 0.088957 | -0.040585 | 0.203829 | 0.019188 | 0.385599 | 0.275852 | 0.292260 | 0.467351 | 0.023798 | 0.001333 | -0.003306 | 0.040620 | -0.010759 | -0.055782 | -0.230085 | 0.079441 | -0.042603 | 0.027916 | -0.104834 | 0.030553 | 0.027371 | -0.009160 | 0.044434 | 0.370580 | -0.002398 | -0.013722 | 0.354147 | 0.045749 | 0.040430 | 0.005559 | 0.260811 | 0.004636 | 0.008473 | 0.006206 | 0.018445 | -0.003803 | -0.001806 | 0.001724 | 0.015926 | 0.019597 | 0.014404 | 0.018251 |
| mths_since_rcnt_il | -0.010939 | -0.070732 | -0.040577 | -0.124471 | 0.006475 | -0.014719 | -0.063832 | -0.009138 | -0.009207 | -0.132822 | -0.013098 | 0.006492 | 0.050436 | -0.151313 | 0.006515 | -0.009439 | -0.014885 | -0.007797 | -0.016606 | -0.034024 | 0.029807 | 0.000400 | -0.012514 | nan | 0.002225 | -0.011668 | 0.000480 | 0.001519 | -0.094313 | -0.191141 | -0.225974 | -0.433748 | -0.477143 | 1.000000 | -0.243642 | -0.196568 | -0.035324 | -0.050433 | 0.024194 | -0.130300 | -0.018195 | -0.220436 | -0.143226 | -0.199299 | -0.231516 | -0.026808 | -0.002312 | 0.002824 | 0.057998 | 0.030413 | 0.051245 | 0.251225 | -0.047557 | 0.043264 | -0.011088 | 0.073937 | -0.012572 | 0.003533 | -0.000227 | -0.028310 | -0.195339 | 0.002016 | 0.008299 | -0.206187 | -0.051893 | -0.023922 | 0.001966 | -0.168539 | 0.001255 | -0.000844 | -0.000821 | -0.011075 | 0.003659 | 0.002533 | 0.001287 | -0.006015 | -0.009042 | -0.006879 | -0.010224 |
| total_bal_il | 0.123811 | 0.029101 | 0.113895 | 0.144412 | 0.035930 | 0.006598 | 0.042730 | -0.005613 | -0.001102 | 0.283744 | -0.013009 | 0.080696 | 0.024427 | 0.332353 | 0.072302 | 0.071232 | 0.065898 | 0.019909 | 0.014287 | 0.046771 | -0.006959 | -0.002444 | -0.006472 | nan | 0.056450 | 0.053174 | 0.003306 | -0.000334 | 0.330386 | 0.116788 | 0.555103 | 0.301158 | 0.374235 | -0.243642 | 1.000000 | 0.296561 | 0.000390 | 0.002001 | 0.110382 | 0.284746 | 0.085645 | 0.157711 | 0.126468 | 0.156942 | 0.159472 | 0.045727 | 0.001776 | -0.000372 | 0.165088 | 0.016066 | -0.006354 | -0.102341 | 0.076014 | -0.002949 | 0.000936 | -0.056587 | 0.001689 | 0.059379 | 0.030377 | 0.045820 | 0.470290 | 0.000655 | 0.028785 | 0.129111 | 0.006873 | -0.019226 | 0.001932 | 0.741687 | 0.054583 | 0.016015 | 0.036563 | 0.056861 | -0.001283 | 0.000079 | 0.013392 | 0.011008 | 0.016134 | 0.012621 | 0.007917 |
| il_util | -0.066527 | 0.110996 | -0.020376 | -0.010413 | -0.005845 | -0.089875 | 0.057365 | 0.027116 | -0.014211 | 0.096352 | 0.016822 | -0.068859 | -0.048905 | 0.085100 | -0.069017 | -0.020860 | -0.000934 | 0.010464 | 0.016228 | 0.011988 | -0.066962 | 0.002207 | 0.004003 | nan | -0.011216 | -0.007603 | -0.005755 | 0.001851 | 0.033497 | 0.168492 | 0.282875 | 0.322066 | 0.293599 | -0.196568 | 0.296561 | 1.000000 | 0.064438 | 0.074100 | -0.101476 | 0.482553 | -0.066769 | 0.146622 | 0.036326 | 0.165258 | 0.168733 | -0.040089 | -0.001448 | -0.004039 | -0.006512 | -0.074712 | -0.045730 | -0.130886 | -0.025092 | -0.036964 | 0.024139 | -0.071137 | 0.028208 | 0.073710 | -0.053728 | -0.039246 | 0.180556 | -0.001399 | 0.023074 | 0.175846 | -0.023991 | 0.019139 | 0.000698 | 0.176542 | -0.015260 | 0.009334 | -0.009617 | 0.008494 | -0.000751 | 0.001258 | 0.004656 | 0.014806 | 0.012285 | 0.008848 | 0.008998 |
| open_rv_12m | -0.037639 | 0.098806 | -0.001687 | -0.010477 | -0.014068 | -0.093883 | 0.233357 | 0.036913 | -0.034282 | 0.287677 | 0.063084 | -0.009932 | -0.161647 | 0.195670 | -0.059925 | -0.002947 | 0.004152 | 0.002519 | 0.022246 | 0.013790 | -0.089716 | 0.014971 | 0.016704 | nan | -0.040702 | -0.045312 | -0.001780 | 0.005433 | -0.017374 | 0.623835 | -0.019292 | 0.072657 | 0.063816 | -0.035324 | 0.000390 | 0.064438 | 1.000000 | 0.777855 | -0.103481 | -0.154480 | 0.088761 | 0.099575 | 0.008802 | 0.306278 | 0.538757 | 0.109881 | 0.001965 | -0.000792 | -0.011778 | -0.028951 | -0.380603 | -0.318219 | -0.018674 | -0.287399 | 0.035183 | -0.175055 | 0.034366 | 0.065584 | 0.205672 | 0.230124 | 0.007384 | -0.001489 | 0.001863 | 0.694609 | 0.001069 | 0.066392 | 0.015892 | -0.006221 | -0.042427 | 0.001702 | -0.039615 | -0.037602 | -0.004802 | -0.003865 | -0.008661 | 0.008370 | 0.007648 | 0.006039 | 0.014240 |
| open_rv_24m | -0.028723 | 0.105257 | -0.003636 | 0.004322 | -0.033550 | -0.110218 | 0.206671 | 0.052035 | -0.038498 | 0.372359 | 0.078517 | -0.004606 | -0.176753 | 0.246088 | -0.060851 | 0.003451 | 0.011140 | 0.002235 | 0.028017 | 0.018420 | -0.105819 | 0.017049 | 0.036972 | nan | -0.046755 | -0.048463 | -0.001411 | 0.006431 | -0.029555 | 0.484832 | -0.017898 | 0.076026 | 0.088957 | -0.050433 | 0.002001 | 0.074100 | 0.777855 | 1.000000 | -0.116455 | -0.169183 | 0.110931 | 0.132099 | 0.014265 | 0.291985 | 0.694115 | 0.126875 | 0.004751 | -0.000023 | -0.025566 | -0.052569 | -0.379288 | -0.287445 | -0.032394 | -0.314948 | 0.049340 | -0.137682 | 0.044289 | 0.063423 | 0.270405 | 0.291614 | 0.007707 | -0.000518 | -0.014665 | 0.547412 | 0.027776 | 0.088231 | 0.017339 | -0.002656 | -0.046109 | -0.001930 | -0.046806 | -0.042872 | -0.005857 | -0.003566 | -0.010163 | 0.011266 | 0.011054 | 0.008576 | 0.017302 |
| max_bal_bc | 0.301756 | -0.049629 | 0.146753 | 0.075601 | -0.039752 | 0.035129 | -0.041078 | 0.002934 | -0.000036 | 0.098415 | -0.078578 | 0.448618 | 0.257783 | 0.107755 | 0.188160 | 0.169632 | 0.120973 | 0.007670 | 0.008000 | 0.074831 | 0.073559 | -0.030033 | 0.008813 | nan | 0.051689 | 0.020739 | -0.002453 | -0.007470 | 0.275682 | -0.087043 | 0.032125 | -0.053743 | -0.040585 | 0.024194 | 0.110382 | -0.101476 | -0.103481 | -0.116455 | 1.000000 | 0.144067 | 0.373938 | -0.077270 | -0.006314 | -0.079188 | -0.083777 | 0.146632 | -0.013119 | -0.001101 | 0.095480 | 0.187928 | 0.086300 | 0.063456 | 0.164147 | 0.069325 | -0.008085 | 0.039529 | -0.005419 | -0.084944 | 0.178605 | 0.142603 | 0.031486 | -0.003743 | -0.035688 | -0.085052 | 0.111299 | -0.094092 | -0.013345 | 0.286116 | 0.103880 | -0.014649 | 0.046634 | 0.010080 | -0.006649 | -0.013996 | -0.018235 | -0.006836 | 0.001918 | 0.001035 | 0.007589 |
| all_util | 0.002120 | 0.239756 | 0.009989 | 0.115233 | 0.019021 | -0.353667 | -0.024956 | 0.010053 | -0.012707 | -0.004955 | -0.001639 | 0.095181 | 0.526036 | 0.006651 | -0.032966 | 0.037455 | 0.097418 | 0.027729 | 0.026553 | 0.001114 | -0.163132 | -0.013755 | -0.001782 | nan | -0.005053 | 0.014707 | -0.010364 | -0.002202 | 0.084916 | -0.048107 | 0.360232 | 0.178771 | 0.203829 | -0.130300 | 0.284746 | 0.482553 | -0.154480 | -0.169183 | 0.144067 | 1.000000 | -0.177309 | 0.072798 | 0.055479 | 0.030970 | -0.032752 | -0.396899 | -0.003977 | -0.001563 | 0.049461 | -0.056505 | 0.090004 | 0.014040 | -0.007029 | 0.077254 | 0.016354 | 0.011151 | 0.021600 | 0.068539 | -0.019947 | -0.161428 | 0.201617 | -0.001747 | 0.027249 | -0.034401 | -0.068334 | -0.012095 | 0.003758 | 0.239899 | 0.008477 | -0.014388 | -0.002180 | 0.008907 | -0.008278 | -0.006738 | 0.000286 | 0.022515 | 0.021160 | 0.015062 | 0.016942 |
| total_rev_hi_lim | 0.324118 | -0.179680 | 0.184504 | 0.060937 | -0.047715 | 0.278390 | 0.019978 | -0.006316 | 0.004679 | 0.392624 | -0.097482 | 0.795467 | -0.131889 | 0.314867 | 0.166715 | 0.202242 | 0.090145 | -0.000933 | 0.000021 | 0.108809 | 0.175649 | -0.021699 | 0.008417 | nan | 0.048283 | 0.019113 | 0.007993 | -0.006770 | 0.400857 | 0.065433 | 0.006929 | 0.008496 | 0.019188 | -0.018195 | 0.085645 | -0.066769 | 0.088761 | 0.110931 | 0.373938 | -0.177309 | 1.000000 | -0.014723 | 0.046688 | 0.018076 | 0.111414 | 0.614022 | -0.011596 | 0.002922 | 0.093013 | 0.265034 | -0.057088 | -0.045233 | 0.221725 | -0.053619 | -0.019013 | -0.017970 | -0.025236 | -0.099772 | 0.368126 | 0.405799 | 0.030094 | -0.000808 | -0.045776 | 0.085095 | 0.173748 | -0.114221 | -0.017991 | 0.429909 | 0.078292 | 0.007106 | 0.036335 | 0.012170 | -0.000763 | -0.004732 | -0.009524 | -0.009263 | -0.001659 | -0.001580 | 0.002299 |
| inq_fi | -0.002118 | 0.112578 | 0.033290 | 0.050512 | 0.013833 | -0.056420 | 0.152191 | 0.005806 | -0.009628 | 0.096810 | 0.048665 | -0.034249 | -0.067437 | 0.135810 | -0.008867 | -0.004933 | 0.007873 | 0.013817 | 0.016472 | 0.026976 | -0.064966 | 0.007354 | 0.006930 | nan | 0.013967 | 0.020772 | -0.002727 | 0.004353 | 0.094672 | 0.166423 | 0.101674 | 0.298148 | 0.385599 | -0.220436 | 0.157711 | 0.146622 | 0.099575 | 0.132099 | -0.077270 | 0.072798 | -0.014723 | 1.000000 | 0.089147 | 0.556471 | 0.259549 | 0.003843 | 0.008952 | 0.000033 | 0.005293 | -0.032523 | -0.060816 | -0.130814 | 0.071146 | -0.048586 | 0.015617 | -0.174509 | 0.017553 | 0.057742 | 0.000450 | 0.042099 | 0.143581 | -0.000394 | 0.004611 | 0.204454 | -0.016218 | 0.058177 | 0.011830 | 0.096812 | 0.002987 | 0.033021 | 0.015223 | 0.014856 | -0.000992 | 0.006567 | 0.019313 | 0.009731 | 0.012802 | 0.009615 | 0.008140 |
| total_cu_tl | 0.062101 | 0.009144 | 0.027533 | 0.076983 | 0.014346 | 0.005386 | 0.027344 | -0.003410 | 0.001381 | 0.090364 | 0.001342 | 0.040194 | 0.022883 | 0.231469 | 0.025390 | 0.038944 | 0.022730 | 0.012270 | 0.009738 | 0.048054 | 0.004934 | -0.004723 | -0.000355 | nan | 0.045052 | 0.054691 | 0.001735 | -0.001212 | 0.105176 | 0.093383 | 0.091732 | 0.207740 | 0.275852 | -0.143226 | 0.126468 | 0.036326 | 0.008802 | 0.014265 | -0.006314 | 0.055479 | 0.046688 | 0.089147 | 1.000000 | 0.084051 | 0.132467 | 0.001892 | 0.004872 | -0.000722 | 0.092163 | 0.046214 | -0.016307 | -0.068266 | 0.134377 | 0.008162 | 0.001173 | -0.036107 | -0.003962 | -0.002007 | -0.054011 | 0.011131 | 0.243393 | -0.000400 | -0.000488 | 0.100727 | 0.037116 | 0.013657 | -0.009066 | 0.108415 | 0.049703 | 0.025660 | 0.063271 | 0.045391 | 0.000762 | 0.001937 | 0.012138 | 0.006525 | 0.009354 | 0.007427 | 0.005494 |
| inq_last_12m | 0.007719 | 0.137292 | 0.038422 | 0.023485 | 0.023154 | -0.096295 | 0.337480 | 0.006320 | -0.023160 | 0.148988 | 0.066867 | -0.020073 | -0.100607 | 0.169766 | -0.039722 | 0.024700 | 0.029658 | 0.022002 | 0.028908 | 0.043429 | -0.096952 | 0.012988 | 0.000917 | nan | 0.003187 | 0.002368 | -0.001586 | 0.004667 | 0.106811 | 0.323632 | 0.081545 | 0.362914 | 0.292260 | -0.199299 | 0.156942 | 0.165258 | 0.306278 | 0.291985 | -0.079188 | 0.030970 | 0.018076 | 0.556471 | 0.084051 | 1.000000 | 0.331464 | 0.026499 | 0.008507 | -0.000218 | 0.010430 | -0.033328 | -0.140383 | -0.207240 | 0.080944 | -0.104011 | 0.014389 | -0.400194 | 0.015316 | 0.066194 | 0.039594 | 0.094817 | 0.121909 | -0.000625 | 0.014939 | 0.382357 | -0.020994 | 0.076938 | 0.016718 | 0.100145 | -0.014323 | 0.042603 | 0.006205 | 0.003485 | -0.002002 | 0.004137 | 0.011509 | 0.012039 | 0.015156 | 0.010676 | 0.014876 |
| acc_open_past_24mths | -0.000910 | 0.170754 | 0.039948 | 0.084121 | -0.050130 | -0.104138 | 0.270961 | 0.080344 | -0.034106 | 0.489835 | 0.095035 | -0.010744 | -0.217423 | 0.429439 | -0.036855 | -0.002721 | 0.018871 | 0.014134 | 0.060882 | 0.059037 | -0.143507 | 0.015796 | 0.066191 | nan | -0.018429 | -0.017557 | -0.003258 | 0.005637 | 0.111407 | 0.457063 | 0.135914 | 0.357096 | 0.467351 | -0.231516 | 0.159472 | 0.168733 | 0.538757 | 0.694115 | -0.083777 | -0.032752 | 0.111414 | 0.259549 | 0.132467 | 0.331464 | 1.000000 | 0.126846 | 0.005348 | -0.002030 | 0.002447 | -0.055376 | -0.408996 | -0.449088 | 0.072588 | -0.340300 | 0.075730 | -0.204107 | 0.072142 | 0.074345 | 0.234582 | 0.299241 | 0.250247 | -0.002802 | -0.028509 | 0.762129 | 0.056793 | 0.113473 | 0.016106 | 0.160463 | -0.019266 | 0.007645 | -0.010438 | -0.013372 | -0.005552 | -0.002604 | -0.001092 | 0.017648 | 0.018833 | 0.014883 | 0.033141 |
| bc_open_to_buy | 0.202274 | -0.293217 | 0.102331 | -0.035610 | -0.059511 | 0.498705 | 0.013931 | 0.001554 | 0.003619 | 0.307870 | -0.084030 | 0.163242 | -0.472669 | 0.234996 | 0.156464 | 0.072109 | -0.055307 | -0.022493 | -0.030414 | 0.069826 | 0.259335 | -0.015399 | 0.011250 | nan | 0.041610 | 0.013869 | 0.008684 | -0.004845 | 0.163049 | 0.093045 | -0.009820 | 0.022781 | 0.023798 | -0.026808 | 0.045727 | -0.040089 | 0.109881 | 0.126875 | 0.146632 | -0.396899 | 0.614022 | 0.003843 | 0.001892 | 0.026499 | 0.126846 | 1.000000 | -0.010695 | 0.000262 | 0.029588 | 0.175238 | -0.071435 | -0.064575 | 0.121707 | -0.121301 | -0.023388 | -0.021583 | -0.020080 | -0.084876 | 0.255262 | 0.422182 | 0.003291 | 0.000737 | -0.043327 | 0.112292 | 0.163346 | -0.092178 | -0.020222 | 0.120427 | 0.050130 | 0.016407 | 0.031908 | 0.018003 | 0.003855 | 0.000629 | -0.002281 | -0.016906 | -0.011324 | -0.009746 | -0.014245 |
| chargeoff_within_12_mths | -0.003796 | 0.014187 | 0.004656 | -0.003290 | 0.140029 | -0.053945 | 0.011812 | -0.096586 | -0.011095 | 0.006394 | -0.005005 | -0.010372 | -0.010939 | 0.040991 | -0.008875 | 0.002493 | 0.004673 | 0.003155 | 0.002965 | 0.001901 | -0.019233 | 0.043681 | -0.195992 | nan | -0.006793 | -0.007172 | 0.037628 | 0.001930 | 0.005120 | 0.002747 | 0.000496 | -0.000206 | 0.001333 | -0.002312 | 0.001776 | -0.001448 | 0.001965 | 0.004751 | -0.013119 | -0.003977 | -0.011596 | 0.008952 | 0.004872 | 0.008507 | 0.005348 | -0.010695 | 1.000000 | 0.010843 | 0.017889 | 0.031198 | -0.001298 | -0.001438 | 0.027821 | 0.005529 | -0.035543 | -0.007386 | -0.045389 | 0.119035 | -0.009084 | 0.030780 | 0.013672 | 0.035461 | 0.209571 | 0.002697 | -0.082891 | -0.011010 | -0.000972 | -0.002882 | -0.007137 | -0.002674 | -0.004398 | -0.004597 | 0.008797 | -0.000555 | -0.000345 | 0.002715 | 0.002218 | 0.001192 | 0.001434 |
| delinq_amnt | 0.000876 | 0.004939 | 0.003848 | -0.003739 | 0.028506 | -0.011029 | 0.001472 | -0.030407 | -0.005058 | 0.003078 | 0.004111 | 0.003822 | -0.004238 | 0.005723 | -0.004184 | 0.003659 | 0.003429 | 0.001686 | 0.001770 | 0.001436 | -0.005078 | 0.006599 | -0.055112 | nan | -0.001905 | -0.002577 | 0.170756 | 0.000400 | 0.018324 | -0.002194 | -0.002005 | -0.002705 | -0.003306 | 0.002824 | -0.000372 | -0.004039 | -0.000792 | -0.000023 | -0.001101 | -0.001563 | 0.002922 | 0.000033 | -0.000722 | -0.000218 | -0.002030 | 0.000262 | 0.010843 | 1.000000 | 0.003924 | 0.007007 | 0.001958 | 0.002462 | 0.012931 | 0.003017 | -0.001716 | -0.000217 | -0.003047 | 0.017446 | -0.000756 | 0.002873 | -0.000476 | 0.281731 | 0.038948 | -0.001869 | -0.012879 | -0.001099 | 0.005298 | 0.002581 | -0.002200 | -0.000814 | -0.001565 | -0.002042 | 0.000143 | -0.000482 | -0.001527 | 0.000237 | 0.000656 | -0.000283 | 0.000243 |
| mo_sin_old_il_acct | 0.121871 | -0.060930 | 0.072371 | 0.037354 | 0.078990 | 0.014945 | 0.011956 | 0.001019 | -0.028244 | 0.141980 | 0.033138 | 0.101938 | 0.067604 | 0.328376 | 0.038966 | 0.103989 | 0.078078 | 0.007000 | 0.007533 | 0.046075 | 0.045935 | 0.008943 | -0.006603 | nan | 0.018655 | 0.009899 | 0.015045 | 0.003957 | 0.176700 | 0.012456 | 0.127323 | 0.029942 | 0.040620 | 0.057998 | 0.165088 | -0.006512 | -0.011778 | -0.025566 | 0.095480 | 0.049461 | 0.093013 | 0.005293 | 0.092163 | 0.010430 | 0.002447 | 0.029588 | 0.017889 | 0.003924 | 1.000000 | 0.210427 | 0.036693 | 0.012083 | 0.187770 | 0.054653 | 0.000479 | -0.014325 | -0.001429 | 0.112578 | 0.039426 | 0.109667 | 0.340678 | 0.005451 | 0.049349 | 0.012012 | -0.102623 | 0.024494 | 0.017633 | 0.209140 | 0.022928 | -0.004242 | 0.028103 | 0.010121 | -0.001227 | -0.003856 | 0.002676 | 0.005541 | 0.006389 | 0.005550 | 0.006309 |
| mo_sin_old_rev_tl_op | 0.163331 | -0.132195 | 0.086826 | 0.040858 | 0.078289 | 0.123775 | -0.004115 | -0.029417 | -0.054218 | 0.143674 | 0.038086 | 0.226684 | 0.021537 | 0.276759 | 0.045116 | 0.144128 | 0.081102 | 0.000637 | -0.000392 | 0.054982 | 0.130261 | -0.009409 | -0.004206 | nan | 0.029400 | 0.015481 | 0.025536 | 0.005625 | 0.186017 | -0.010326 | -0.053700 | -0.006454 | -0.010759 | 0.030413 | 0.016066 | -0.074712 | -0.028951 | -0.052569 | 0.187928 | -0.056505 | 0.265034 | -0.032523 | 0.046214 | -0.033328 | -0.055376 | 0.175238 | 0.031198 | 0.007007 | 0.210427 | 1.000000 | 0.082318 | 0.041911 | 0.288378 | 0.128198 | 0.006382 | 0.005175 | -0.001505 | 0.069280 | 0.131381 | 0.306023 | -0.009317 | 0.007126 | 0.027811 | -0.026444 | -0.081103 | 0.034316 | 0.019655 | 0.114442 | 0.045359 | 0.003638 | 0.042382 | 0.003679 | 0.005874 | -0.002702 | 0.009575 | -0.003653 | -0.001128 | 0.000792 | 0.007149 |
| mo_sin_rcnt_rev_tl_op | 0.051917 | -0.092014 | 0.018121 | -0.007125 | 0.025681 | 0.101791 | -0.181483 | -0.042835 | 0.010135 | -0.235478 | -0.062693 | 0.021904 | 0.173055 | -0.169534 | 0.061467 | 0.020415 | 0.008620 | 0.001256 | -0.028985 | -0.015064 | 0.096843 | -0.011896 | -0.034629 | nan | 0.036263 | 0.035709 | 0.001288 | -0.003781 | 0.031700 | -0.295497 | -0.006572 | -0.048871 | -0.055782 | 0.051245 | -0.006354 | -0.045730 | -0.380603 | -0.379288 | 0.086300 | 0.090004 | -0.057088 | -0.060816 | -0.016307 | -0.140383 | -0.408996 | -0.071435 | -0.001298 | 0.001958 | 0.036693 | 0.082318 | 1.000000 | 0.606891 | 0.024535 | 0.602563 | -0.040846 | 0.131354 | -0.032386 | -0.034482 | -0.163919 | -0.189633 | -0.017925 | 0.002454 | 0.012194 | -0.410029 | -0.031927 | -0.080736 | -0.004816 | 0.011697 | 0.038796 | 0.004604 | 0.035350 | 0.030703 | 0.004866 | 0.004878 | 0.010161 | -0.005861 | -0.004679 | -0.003868 | -0.017892 |
| mo_sin_rcnt_tl | 0.027910 | -0.110852 | -0.018442 | -0.053873 | 0.017499 | 0.067491 | -0.216743 | -0.040986 | 0.012580 | -0.231656 | -0.056159 | 0.022872 | 0.158714 | -0.212754 | 0.044814 | 0.008866 | -0.006380 | -0.008215 | -0.034536 | -0.033944 | 0.089757 | -0.009202 | -0.033364 | nan | 0.017289 | 0.017507 | 0.000791 | -0.003475 | -0.079467 | -0.385483 | -0.084694 | -0.245772 | -0.230085 | 0.251225 | -0.102341 | -0.130886 | -0.318219 | -0.287445 | 0.063456 | 0.014040 | -0.045233 | -0.130814 | -0.068266 | -0.207240 | -0.449088 | -0.064575 | -0.001438 | 0.002462 | 0.012083 | 0.041911 | 0.606891 | 1.000000 | -0.059270 | 0.373445 | -0.039670 | 0.194335 | -0.037020 | -0.040801 | -0.094191 | -0.137242 | -0.131948 | 0.002980 | 0.010433 | -0.499744 | -0.025160 | -0.066795 | -0.008797 | -0.091312 | 0.021323 | -0.002090 | 0.008364 | 0.012823 | 0.005217 | 0.004578 | 0.005177 | -0.008319 | -0.008207 | -0.006873 | -0.019152 |
| mort_acc | 0.217007 | -0.089455 | 0.134308 | -0.009513 | 0.074920 | 0.091636 | 0.045206 | -0.044425 | -0.045251 | 0.133260 | -0.011443 | 0.211464 | 0.037770 | 0.364029 | 0.016807 | 0.220997 | 0.124252 | 0.006366 | 0.015154 | 0.154964 | 0.098446 | -0.013218 | -0.029380 | nan | 0.049842 | 0.025985 | 0.023485 | 0.001339 | 0.538517 | 0.047711 | -0.002429 | 0.062588 | 0.079441 | -0.047557 | 0.076014 | -0.025092 | -0.018674 | -0.032394 | 0.164147 | -0.007029 | 0.221725 | 0.071146 | 0.134377 | 0.080944 | 0.072588 | 0.121707 | 0.027821 | 0.012931 | 0.187770 | 0.288378 | 0.024535 | -0.059270 | 1.000000 | 0.054591 | -0.011628 | -0.059319 | -0.016255 | 0.057322 | 0.040252 | 0.188970 | 0.095751 | 0.010201 | 0.028327 | 0.065123 | -0.031951 | -0.008983 | -0.008117 | 0.162759 | 0.051657 | 0.009677 | 0.126855 | 0.022500 | -0.002314 | -0.006603 | 0.007923 | -0.007530 | -0.000935 | -0.001079 | 0.007482 |
| mths_since_recent_bc | 0.035975 | -0.074406 | 0.015786 | 0.002712 | 0.052037 | 0.076042 | -0.125462 | -0.057820 | 0.009797 | -0.206842 | -0.046879 | 0.026708 | 0.141543 | -0.123603 | 0.035591 | 0.025673 | 0.017621 | 0.002300 | -0.024313 | -0.012101 | 0.085956 | -0.008505 | -0.044427 | nan | 0.036155 | 0.035135 | 0.008219 | -0.001693 | 0.044737 | -0.203359 | -0.010106 | -0.034510 | -0.042603 | 0.043264 | -0.002949 | -0.036964 | -0.287399 | -0.314948 | 0.069325 | 0.077254 | -0.053619 | -0.048586 | 0.008162 | -0.104011 | -0.340300 | -0.121301 | 0.005529 | 0.003017 | 0.054653 | 0.128198 | 0.602563 | 0.373445 | 0.054591 | 1.000000 | -0.042982 | 0.083973 | -0.045694 | -0.014929 | -0.249648 | -0.228936 | -0.007023 | 0.004930 | 0.024278 | -0.306353 | -0.052764 | -0.063388 | -0.000946 | 0.015359 | 0.035944 | 0.009097 | 0.035729 | 0.028762 | 0.005298 | 0.006134 | 0.011454 | -0.003992 | -0.003901 | -0.002558 | -0.013932 |
| mths_since_recent_bc_dlq | -0.014878 | -0.008518 | -0.011872 | 0.005586 | -0.355505 | 0.002756 | 0.017430 | 0.508250 | -0.027069 | -0.007896 | 0.043748 | -0.013419 | 0.005923 | 0.003447 | -0.001672 | -0.015187 | -0.016642 | -0.017257 | -0.003900 | 0.003946 | 0.020690 | -0.006123 | 0.324736 | nan | -0.003187 | 0.000119 | -0.076328 | 0.011116 | -0.021464 | 0.024360 | -0.005566 | 0.022457 | 0.027916 | -0.011088 | 0.000936 | 0.024139 | 0.035183 | 0.049340 | -0.008085 | 0.016354 | -0.019013 | 0.015617 | 0.001173 | 0.014389 | 0.075730 | -0.023388 | -0.035543 | -0.001716 | 0.000479 | 0.006382 | -0.040846 | -0.039670 | -0.011628 | -0.042982 | 1.000000 | -0.008629 | 0.748270 | 0.115160 | -0.007618 | 0.010354 | 0.000615 | -0.018796 | -0.114373 | 0.056765 | 0.044863 | 0.043711 | 0.005293 | -0.007928 | -0.000892 | 0.000034 | -0.000691 | -0.001214 | -0.003313 | -0.002491 | 0.018042 | -0.001296 | -0.001933 | -0.001361 | -0.000321 |
| mths_since_recent_inq | 0.001843 | -0.136729 | -0.027008 | 0.005874 | -0.027413 | 0.069530 | -0.530440 | -0.002560 | 0.024351 | -0.100140 | -0.051247 | 0.010184 | 0.085834 | -0.121115 | 0.038815 | -0.013978 | -0.030004 | -0.017632 | -0.035682 | -0.036035 | 0.090530 | -0.010236 | 0.007521 | nan | 0.010529 | 0.015018 | 0.001432 | -0.004602 | -0.055889 | -0.234572 | -0.028485 | -0.153202 | -0.104834 | 0.073937 | -0.056587 | -0.071137 | -0.175055 | -0.137682 | 0.039529 | 0.011151 | -0.017970 | -0.174509 | -0.036107 | -0.400194 | -0.204107 | -0.021583 | -0.007386 | -0.000217 | -0.014325 | 0.005175 | 0.131354 | 0.194335 | -0.059319 | 0.083973 | -0.008629 | 1.000000 | -0.009608 | -0.048612 | -0.030118 | -0.080344 | -0.071679 | 0.000343 | -0.022685 | -0.282148 | 0.028817 | -0.055059 | -0.014261 | -0.049522 | 0.016404 | -0.021251 | 0.008060 | 0.009457 | 0.001823 | -0.000481 | 0.001823 | -0.009264 | -0.010970 | -0.008189 | -0.014196 |
| mths_since_recent_revol_delinq | -0.013058 | -0.013006 | -0.011866 | 0.004206 | -0.415913 | 0.015574 | 0.017124 | 0.679521 | -0.030939 | -0.029382 | 0.046190 | -0.018379 | 0.012355 | -0.012768 | 0.007818 | -0.021104 | -0.022103 | -0.020072 | -0.007312 | 0.003570 | 0.029516 | -0.007303 | 0.349950 | nan | 0.000117 | 0.004030 | -0.097465 | 0.010445 | -0.025167 | 0.026015 | -0.005276 | 0.025747 | 0.030553 | -0.012572 | 0.001689 | 0.028208 | 0.034366 | 0.044289 | -0.005419 | 0.021600 | -0.025236 | 0.017553 | -0.003962 | 0.015316 | 0.072142 | -0.020080 | -0.045389 | -0.003047 | -0.001429 | -0.001505 | -0.032386 | -0.037020 | -0.016255 | -0.045694 | 0.748270 | -0.009608 | 1.000000 | 0.110657 | 0.002982 | 0.009779 | 0.000077 | -0.024465 | -0.114869 | 0.058811 | 0.060780 | 0.049076 | 0.004347 | -0.009195 | 0.002676 | 0.002074 | 0.001856 | 0.001588 | -0.003142 | -0.002093 | 0.021797 | -0.001925 | -0.002183 | -0.001771 | -0.003337 |
| num_accts_ever_120_pd | -0.052812 | 0.051257 | 0.008240 | -0.028910 | 0.217031 | -0.195481 | 0.047535 | 0.007393 | -0.062473 | 0.023124 | 0.011634 | -0.077360 | -0.019756 | 0.144949 | -0.028499 | -0.032542 | -0.013253 | 0.009550 | 0.004189 | -0.010915 | -0.074444 | 0.048277 | -0.065735 | nan | -0.013922 | -0.019526 | 0.020516 | 0.029254 | 0.015067 | 0.055843 | 0.072552 | 0.032506 | 0.027371 | 0.003533 | 0.059379 | 0.073710 | 0.065584 | 0.063423 | -0.084944 | 0.068539 | -0.099772 | 0.057742 | -0.002007 | 0.066194 | 0.074345 | -0.084876 | 0.119035 | 0.017446 | 0.112578 | 0.069280 | -0.034482 | -0.040801 | 0.057322 | -0.014929 | 0.115160 | -0.048612 | 0.110657 | 1.000000 | -0.053817 | 0.057587 | 0.136472 | 0.031374 | 0.311553 | 0.082470 | -0.578652 | -0.031873 | 0.011985 | 0.019976 | -0.024471 | -0.005260 | -0.009463 | -0.012628 | -0.000020 | -0.000129 | 0.029417 | 0.008013 | 0.005454 | 0.004967 | 0.001420 |
| num_actv_bc_tl | 0.188675 | 0.020161 | 0.076037 | 0.109439 | -0.037447 | -0.111754 | 0.074155 | 0.020585 | 0.006449 | 0.554703 | -0.032539 | 0.314503 | 0.103948 | 0.310379 | 0.074031 | 0.138406 | 0.130315 | 0.001645 | 0.026760 | 0.030368 | -0.038117 | -0.005817 | 0.023308 | nan | -0.027847 | -0.032077 | -0.005806 | -0.003956 | 0.108827 | 0.105061 | 0.003730 | -0.024332 | -0.009160 | -0.000227 | 0.030377 | -0.053728 | 0.205672 | 0.270405 | 0.178605 | -0.019947 | 0.368126 | 0.000450 | -0.054011 | 0.039594 | 0.234582 | 0.255262 | -0.009084 | -0.000756 | 0.039426 | 0.131381 | -0.163919 | -0.094191 | 0.040252 | -0.249648 | -0.007618 | -0.030118 | 0.002982 | -0.053817 | 1.000000 | 0.605746 | -0.014605 | -0.003514 | -0.031999 | 0.169378 | 0.126901 | -0.057353 | 0.010136 | 0.163611 | 0.008491 | -0.026043 | -0.026220 | -0.037050 | -0.008300 | -0.011740 | -0.027464 | 0.002723 | 0.006726 | 0.005799 | 0.016469 |
| num_bc_tl | 0.189798 | -0.083441 | 0.086344 | 0.048478 | 0.034198 | 0.048662 | 0.135239 | -0.000505 | -0.070440 | 0.537003 | -0.005783 | 0.234385 | -0.122137 | 0.619712 | -0.005218 | 0.190345 | 0.096402 | -0.006475 | 0.033903 | 0.110171 | 0.048409 | -0.011260 | 0.000906 | nan | -0.036074 | -0.050765 | 0.015446 | 0.003036 | 0.144420 | 0.154252 | -0.005681 | 0.030740 | 0.044434 | -0.028310 | 0.045820 | -0.039246 | 0.230124 | 0.291614 | 0.142603 | -0.161428 | 0.405799 | 0.042099 | 0.011131 | 0.094817 | 0.299241 | 0.422182 | 0.030780 | 0.002873 | 0.109667 | 0.306023 | -0.189633 | -0.137242 | 0.188970 | -0.228936 | 0.010354 | -0.080344 | 0.009779 | 0.057587 | 0.605746 | 1.000000 | 0.049006 | 0.006499 | 0.014035 | 0.237160 | 0.058478 | 0.002088 | -0.006193 | 0.140116 | -0.008458 | -0.025463 | -0.022035 | -0.043282 | -0.007129 | -0.014364 | -0.029901 | -0.005925 | -0.001625 | -0.000959 | 0.020314 |
| num_il_tl | 0.080394 | 0.016363 | 0.068678 | 0.143835 | 0.082954 | -0.015162 | 0.066432 | -0.008564 | -0.016152 | 0.393398 | -0.014798 | 0.027345 | 0.021434 | 0.679999 | 0.019109 | 0.062986 | 0.054832 | 0.018215 | 0.025363 | 0.061123 | -0.010546 | 0.007777 | -0.017339 | nan | 0.012500 | 0.017619 | 0.007852 | 0.002438 | 0.221976 | 0.107653 | 0.519613 | 0.270786 | 0.370580 | -0.195339 | 0.470290 | 0.180556 | 0.007384 | 0.007707 | 0.031486 | 0.201617 | 0.030094 | 0.143581 | 0.243393 | 0.121909 | 0.250247 | 0.003291 | 0.013672 | -0.000476 | 0.340678 | -0.009317 | -0.017925 | -0.131948 | 0.095751 | -0.007023 | 0.000615 | -0.071679 | 0.000077 | 0.136472 | -0.014605 | 0.049006 | 1.000000 | 0.002471 | 0.070264 | 0.185447 | -0.000202 | -0.011227 | -0.010626 | 0.513857 | 0.013242 | -0.000577 | 0.015946 | 0.028243 | -0.003300 | -0.003514 | -0.000241 | 0.016900 | 0.016970 | 0.014265 | 0.013366 |
| num_tl_120dpd_2m | -0.001701 | 0.005927 | 0.002738 | -0.003302 | 0.042290 | -0.015469 | 0.000843 | -0.049328 | -0.004764 | 0.004030 | 0.003031 | -0.002839 | -0.007999 | 0.009295 | -0.008827 | 0.004726 | 0.004102 | 0.001826 | 0.001681 | 0.002787 | -0.005534 | 0.002919 | -0.089404 | nan | -0.003618 | -0.004027 | 0.383466 | 0.000452 | 0.006239 | -0.002592 | 0.000628 | -0.002332 | -0.002398 | 0.002016 | 0.000655 | -0.001399 | -0.001489 | -0.000518 | -0.003743 | -0.001747 | -0.000808 | -0.000394 | -0.000400 | -0.000625 | -0.002802 | 0.000737 | 0.035461 | 0.281731 | 0.005451 | 0.007126 | 0.002454 | 0.002980 | 0.010201 | 0.004930 | -0.018796 | 0.000343 | -0.024465 | 0.031374 | -0.003514 | 0.006499 | 0.002471 | 1.000000 | 0.064993 | -0.003573 | -0.016638 | -0.001418 | 0.004067 | 0.001757 | -0.003620 | -0.001957 | -0.003107 | -0.003221 | -0.000596 | -0.000436 | -0.001872 | 0.000596 | 0.001085 | 0.000792 | -0.000787 |
| num_tl_90g_dpd_24m | -0.023194 | 0.033069 | 0.003918 | -0.013287 | 0.652864 | -0.102364 | 0.028843 | -0.211626 | -0.029261 | 0.010650 | -0.003588 | -0.032238 | -0.004714 | 0.067703 | -0.022712 | -0.006661 | 0.003484 | 0.010429 | 0.005486 | -0.007012 | -0.051211 | 0.107325 | -0.451924 | nan | -0.011025 | -0.013985 | 0.054663 | 0.001412 | 0.007683 | 0.009464 | 0.043789 | -0.000723 | -0.013722 | 0.008299 | 0.028785 | 0.023074 | 0.001863 | -0.014665 | -0.035688 | 0.027249 | -0.045776 | 0.004611 | -0.000488 | 0.014939 | -0.028509 | -0.043327 | 0.209571 | 0.038948 | 0.049349 | 0.027811 | 0.012194 | 0.010433 | 0.028327 | 0.024278 | -0.114373 | -0.022685 | -0.114869 | 0.311553 | -0.031999 | 0.014035 | 0.070264 | 0.064993 | 1.000000 | -0.000725 | -0.263743 | -0.012471 | 0.002231 | 0.014325 | -0.015153 | -0.005420 | -0.008276 | -0.009207 | 0.004193 | 0.000904 | -0.004246 | 0.006456 | 0.004364 | 0.004332 | 0.000051 |
| num_tl_op_past_12m | -0.026413 | 0.179675 | 0.034117 | 0.045030 | -0.022004 | -0.094079 | 0.317134 | 0.061006 | -0.037421 | 0.367584 | 0.082691 | -0.023464 | -0.211007 | 0.329007 | -0.046332 | -0.015762 | 0.008746 | 0.013386 | 0.051714 | 0.044704 | -0.129929 | 0.013428 | 0.034201 | nan | -0.017016 | -0.019992 | -0.004853 | 0.005750 | 0.097313 | 0.598675 | 0.099281 | 0.459989 | 0.354147 | -0.206187 | 0.129111 | 0.175846 | 0.694609 | 0.547412 | -0.085052 | -0.034401 | 0.085095 | 0.204454 | 0.100727 | 0.382357 | 0.762129 | 0.112292 | 0.002697 | -0.001869 | 0.012012 | -0.026444 | -0.410029 | -0.499744 | 0.065123 | -0.306353 | 0.056765 | -0.282148 | 0.058811 | 0.082470 | 0.169378 | 0.237160 | 0.185447 | -0.003573 | -0.000725 | 1.000000 | 0.010057 | 0.091759 | 0.017482 | 0.119055 | -0.020319 | 0.011513 | -0.009706 | -0.012897 | -0.004347 | -0.002523 | -0.000112 | 0.013119 | 0.013594 | 0.010647 | 0.028470 |
| pct_tl_nvr_dlq | 0.088315 | -0.078506 | -0.004852 | 0.064941 | -0.439711 | 0.301095 | -0.027086 | 0.143758 | 0.080401 | 0.109123 | -0.008904 | 0.112433 | -0.029578 | 0.020832 | 0.039407 | 0.053558 | 0.013737 | -0.030794 | 0.000805 | 0.042111 | 0.132733 | -0.047912 | 0.088492 | nan | 0.011527 | 0.023176 | -0.043624 | -0.015492 | 0.010765 | 0.001170 | -0.003597 | 0.019323 | 0.045749 | -0.051893 | 0.006873 | -0.023991 | 0.001069 | 0.027776 | 0.111299 | -0.068334 | 0.173748 | -0.016218 | 0.037116 | -0.020994 | 0.056793 | 0.163346 | -0.082891 | -0.012879 | -0.102623 | -0.081103 | -0.031927 | -0.025160 | -0.031951 | -0.052764 | 0.044863 | 0.028817 | 0.060780 | -0.578652 | 0.126901 | 0.058478 | -0.000202 | -0.016638 | -0.263743 | 0.010057 | 1.000000 | 0.050405 | -0.032248 | 0.061378 | 0.033199 | 0.005035 | 0.008918 | 0.013444 | -0.000805 | -0.002520 | -0.034944 | -0.010585 | -0.006294 | -0.006427 | 0.000927 |
| pub_rec_bankruptcies | -0.083540 | 0.056647 | -0.027128 | -0.012374 | -0.049301 | -0.196333 | 0.073674 | 0.068626 | 0.158202 | -0.016406 | 0.659178 | -0.108813 | -0.073827 | 0.022959 | -0.030017 | -0.069756 | -0.042622 | -0.009321 | 0.002106 | -0.011111 | -0.071058 | -0.003728 | 0.041532 | nan | -0.007287 | -0.001847 | -0.008813 | 0.000103 | -0.089454 | 0.047483 | -0.021386 | 0.033850 | 0.040430 | -0.023922 | -0.019226 | 0.019139 | 0.066392 | 0.088231 | -0.094092 | -0.012095 | -0.114221 | 0.058177 | 0.013657 | 0.076938 | 0.113473 | -0.092178 | -0.011010 | -0.001099 | 0.024494 | 0.034316 | -0.080736 | -0.066795 | -0.008983 | -0.063388 | 0.043711 | -0.055059 | 0.049076 | -0.031873 | -0.057353 | 0.002088 | -0.011227 | -0.001418 | -0.012471 | 0.091759 | 0.050405 | 1.000000 | 0.033034 | -0.072824 | -0.017700 | 0.002491 | -0.008240 | -0.007971 | -0.002506 | -0.002637 | -0.006604 | 0.005243 | 0.003604 | 0.002190 | 0.000849 |
| tax_liens | 0.007553 | 0.013887 | 0.024444 | -0.020503 | 0.011384 | -0.059252 | 0.013747 | 0.002900 | -0.281507 | -0.005172 | 0.697894 | -0.009495 | -0.002836 | -0.015105 | -0.024566 | 0.027912 | 0.027680 | 0.017068 | 0.006221 | -0.000494 | -0.026947 | 0.010757 | 0.006055 | nan | -0.014029 | -0.016761 | 0.007868 | 0.003100 | -0.000533 | 0.011207 | -0.008704 | 0.005013 | 0.005559 | 0.001966 | 0.001932 | 0.000698 | 0.015892 | 0.017339 | -0.013345 | 0.003758 | -0.017991 | 0.011830 | -0.009066 | 0.016718 | 0.016106 | -0.020222 | -0.000972 | 0.005298 | 0.017633 | 0.019655 | -0.004816 | -0.008797 | -0.008117 | -0.000946 | 0.005293 | -0.014261 | 0.004347 | 0.011985 | 0.010136 | -0.006193 | -0.010626 | 0.004067 | 0.002231 | 0.017482 | -0.032248 | 0.033034 | 1.000000 | -0.001037 | -0.015580 | -0.009266 | -0.012815 | -0.012966 | -0.002268 | -0.002711 | -0.007662 | 0.005652 | 0.004798 | 0.004312 | -0.000027 |
| total_bal_ex_mort | 0.273690 | 0.006858 | 0.206539 | 0.193084 | 0.028043 | 0.021718 | 0.036024 | -0.015190 | -0.004632 | 0.402391 | -0.054381 | 0.502934 | 0.124504 | 0.435480 | 0.127442 | 0.186851 | 0.153866 | 0.030491 | 0.029981 | 0.098089 | 0.022430 | -0.013295 | -0.007266 | nan | 0.063929 | 0.050834 | 0.006946 | -0.002663 | 0.529959 | 0.073372 | 0.397954 | 0.202664 | 0.260811 | -0.168539 | 0.741687 | 0.176542 | -0.006221 | -0.002656 | 0.286116 | 0.239899 | 0.429909 | 0.096812 | 0.108415 | 0.100145 | 0.160463 | 0.120427 | -0.002882 | 0.002581 | 0.209140 | 0.114442 | 0.011697 | -0.091312 | 0.162759 | 0.015359 | -0.007928 | -0.049522 | -0.009195 | 0.019976 | 0.163611 | 0.140116 | 0.513857 | 0.001757 | 0.014325 | 0.119055 | 0.061378 | -0.072824 | -0.001037 | 1.000000 | 0.080022 | 0.012251 | 0.043211 | 0.045804 | -0.002321 | -0.002652 | 0.006451 | 0.011571 | 0.018319 | 0.015349 | 0.016445 |
| revol_bal_joint | 0.142843 | 0.019964 | -0.007593 | 0.202351 | -0.019299 | 0.084799 | -0.039425 | 0.007708 | 0.019844 | 0.027442 | -0.027737 | 0.073569 | 0.004104 | 0.015306 | 0.258892 | -0.051991 | -0.002145 | 0.001903 | -0.021800 | -0.019991 | 0.058734 | -0.011612 | 0.008069 | nan | 0.771902 | 0.756232 | -0.008009 | -0.002710 | 0.099379 | -0.020258 | 0.017154 | 0.005731 | 0.004636 | 0.001255 | 0.054583 | -0.015260 | -0.042427 | -0.046109 | 0.103880 | 0.008477 | 0.078292 | 0.002987 | 0.049703 | -0.014323 | -0.019266 | 0.050130 | -0.007137 | -0.002200 | 0.022928 | 0.045359 | 0.038796 | 0.021323 | 0.051657 | 0.035944 | -0.000892 | 0.016404 | 0.002676 | -0.024471 | 0.008491 | -0.008458 | 0.013242 | -0.003620 | -0.015153 | -0.020319 | 0.033199 | -0.017700 | -0.015580 | 0.080022 | 1.000000 | 0.406742 | 0.621933 | 0.580056 | 0.066234 | 0.091430 | 0.296927 | -0.002932 | 0.003691 | 0.000706 | -0.010376 |
| sec_app_inq_last_6mths | 0.044441 | 0.033892 | -0.020559 | 0.114665 | -0.006185 | 0.046303 | 0.017500 | 0.002045 | 0.012532 | -0.002424 | -0.008395 | -0.005325 | -0.034671 | -0.008357 | 0.122532 | -0.051633 | -0.014344 | 0.009834 | -0.010808 | -0.020338 | 0.023200 | -0.004201 | 0.003473 | nan | 0.437776 | 0.477577 | -0.005211 | -0.000792 | 0.022785 | 0.021425 | -0.002054 | 0.015355 | 0.008473 | -0.000844 | 0.016015 | 0.009334 | 0.001702 | -0.001930 | -0.014649 | -0.014388 | 0.007106 | 0.033021 | 0.025660 | 0.042603 | 0.007645 | 0.016407 | -0.002674 | -0.000814 | -0.004242 | 0.003638 | 0.004604 | -0.002090 | 0.009677 | 0.009097 | 0.000034 | -0.021251 | 0.002074 | -0.005260 | -0.026043 | -0.025463 | -0.000577 | -0.001957 | -0.005420 | 0.011513 | 0.005035 | 0.002491 | -0.009266 | 0.012251 | 0.406742 | 1.000000 | 0.322923 | 0.407019 | 0.065516 | 0.125104 | 0.292445 | 0.000616 | 0.005503 | 0.002424 | -0.005114 |
| sec_app_mort_acc | 0.108097 | -0.006679 | -0.016953 | 0.168301 | -0.004838 | 0.078957 | -0.032671 | 0.002707 | 0.012706 | 0.003837 | -0.018577 | 0.027625 | -0.011390 | 0.021639 | 0.200253 | -0.042511 | -0.011201 | -0.003022 | -0.020006 | -0.009593 | 0.057490 | -0.009409 | 0.006788 | nan | 0.607645 | 0.574774 | -0.006577 | -0.002010 | 0.108968 | -0.009168 | 0.004663 | 0.008100 | 0.006206 | -0.000821 | 0.036563 | -0.009617 | -0.039615 | -0.046806 | 0.046634 | -0.002180 | 0.036335 | 0.015223 | 0.063271 | 0.006205 | -0.010438 | 0.031908 | -0.004398 | -0.001565 | 0.028103 | 0.042382 | 0.035350 | 0.008364 | 0.126855 | 0.035729 | -0.000691 | 0.008060 | 0.001856 | -0.009463 | -0.026220 | -0.022035 | 0.015946 | -0.003107 | -0.008276 | -0.009706 | 0.008918 | -0.008240 | -0.012815 | 0.043211 | 0.621933 | 0.322923 | 1.000000 | 0.457389 | 0.042973 | 0.062355 | 0.297615 | -0.003693 | 0.001330 | -0.000815 | -0.009128 |
| sec_app_open_act_il | 0.084177 | 0.021499 | -0.022342 | 0.163370 | -0.010619 | 0.075924 | -0.031381 | 0.003496 | 0.017240 | 0.004732 | -0.018824 | 0.002940 | -0.022600 | -0.001813 | 0.189630 | -0.058233 | -0.011990 | 0.004636 | -0.018807 | -0.024651 | 0.048943 | -0.007426 | 0.005867 | nan | 0.585813 | 0.651947 | -0.006586 | -0.001696 | 0.051196 | -0.012526 | 0.045939 | 0.018050 | 0.018445 | -0.011075 | 0.056861 | 0.008494 | -0.037602 | -0.042872 | 0.010080 | 0.008907 | 0.012170 | 0.014856 | 0.045391 | 0.003485 | -0.013372 | 0.018003 | -0.004597 | -0.002042 | 0.010121 | 0.003679 | 0.030703 | 0.012823 | 0.022500 | 0.028762 | -0.001214 | 0.009457 | 0.001588 | -0.012628 | -0.037050 | -0.043282 | 0.028243 | -0.003221 | -0.009207 | -0.012897 | 0.013444 | -0.007971 | -0.012966 | 0.045804 | 0.580056 | 0.407019 | 0.457389 | 1.000000 | 0.077593 | 0.121752 | 0.312024 | -0.000699 | 0.004391 | 0.002439 | -0.009129 |
| sec_app_chargeoff_within_12_mths | 0.000363 | 0.010811 | -0.005202 | 0.020799 | 0.002905 | 0.010774 | -0.004106 | -0.004433 | 0.002485 | -0.003578 | -0.003984 | -0.004484 | -0.010452 | -0.004953 | 0.018132 | -0.014472 | -0.005200 | 0.003325 | -0.002604 | -0.007007 | 0.004499 | -0.000611 | -0.004994 | nan | 0.084193 | 0.095488 | -0.000756 | -0.000137 | -0.001828 | -0.003495 | -0.002318 | -0.001680 | -0.003803 | 0.003659 | -0.001283 | -0.000751 | -0.004802 | -0.005857 | -0.006649 | -0.008278 | -0.000763 | -0.000992 | 0.000762 | -0.002002 | -0.005552 | 0.003855 | 0.008797 | 0.000143 | -0.001227 | 0.005874 | 0.004866 | 0.005217 | -0.002314 | 0.005298 | -0.003313 | 0.001823 | -0.003142 | -0.000020 | -0.008300 | -0.007129 | -0.003300 | -0.000596 | 0.004193 | -0.004347 | -0.000805 | -0.002506 | -0.002268 | -0.002321 | 0.066234 | 0.065516 | 0.042973 | 0.077593 | 1.000000 | 0.456591 | 0.030218 | -0.000295 | 0.000035 | -0.000405 | -0.000261 |
| sec_app_collections_12_mths_ex_med | 0.002086 | 0.018747 | -0.009038 | 0.036829 | 0.001511 | 0.010995 | -0.006117 | -0.003123 | 0.004024 | -0.004543 | -0.004736 | -0.008206 | -0.013609 | -0.009164 | 0.032139 | -0.023682 | -0.007863 | 0.005267 | -0.004114 | -0.012024 | 0.003235 | 0.004784 | -0.001631 | nan | 0.134355 | 0.150465 | -0.001594 | 0.000467 | -0.002699 | -0.002332 | -0.002271 | -0.000099 | -0.001806 | 0.002533 | 0.000079 | 0.001258 | -0.003865 | -0.003566 | -0.013996 | -0.006738 | -0.004732 | 0.006567 | 0.001937 | 0.004137 | -0.002604 | 0.000629 | -0.000555 | -0.000482 | -0.003856 | -0.002702 | 0.004878 | 0.004578 | -0.006603 | 0.006134 | -0.002491 | -0.000481 | -0.002093 | -0.000129 | -0.011740 | -0.014364 | -0.003514 | -0.000436 | 0.000904 | -0.002523 | -0.002520 | -0.002637 | -0.002711 | -0.002652 | 0.091430 | 0.125104 | 0.062355 | 0.121752 | 0.456591 | 1.000000 | 0.114210 | -0.000103 | 0.001109 | -0.000022 | -0.000917 |
| sec_app_mths_since_last_major_derog | 0.036875 | 0.024257 | -0.018554 | 0.102848 | -0.002500 | 0.017969 | -0.017927 | 0.019968 | 0.004267 | -0.010295 | -0.012471 | -0.012986 | -0.018487 | -0.012431 | 0.111039 | -0.046900 | -0.014626 | 0.002976 | -0.012979 | -0.019600 | 0.020721 | -0.002350 | 0.032754 | nan | 0.378841 | 0.399583 | -0.004634 | 0.000157 | 0.020882 | -0.000673 | 0.001351 | 0.004545 | 0.001724 | 0.001287 | 0.013392 | 0.004656 | -0.008661 | -0.010163 | -0.018235 | 0.000286 | -0.009524 | 0.019313 | 0.012138 | 0.011509 | -0.001092 | -0.002281 | -0.000345 | -0.001527 | 0.002676 | 0.009575 | 0.010161 | 0.005177 | 0.007923 | 0.011454 | 0.018042 | 0.001823 | 0.021797 | 0.029417 | -0.027464 | -0.029901 | -0.000241 | -0.001872 | -0.004246 | -0.000112 | -0.034944 | -0.006604 | -0.007662 | 0.006451 | 0.296927 | 0.292445 | 0.297615 | 0.312024 | 0.030218 | 0.114210 | 1.000000 | -0.000539 | 0.001915 | 0.000748 | -0.006351 |
| deferral_term | 0.020715 | 0.033240 | 0.000277 | 0.008892 | 0.011962 | -0.025414 | 0.006076 | -0.005115 | -0.006186 | 0.009410 | 0.008697 | -0.000907 | 0.013708 | 0.009111 | 0.003149 | 0.015009 | 0.059278 | 0.125376 | 0.018920 | -0.024967 | -0.072047 | 0.004608 | -0.002477 | nan | -0.001180 | 0.001002 | 0.000799 | 0.000293 | -0.001864 | 0.009236 | 0.010522 | 0.012161 | 0.015926 | -0.006015 | 0.011008 | 0.014806 | 0.008370 | 0.011266 | -0.006836 | 0.022515 | -0.009263 | 0.009731 | 0.006525 | 0.012039 | 0.017648 | -0.016906 | 0.002715 | 0.000237 | 0.005541 | -0.003653 | -0.005861 | -0.008319 | -0.007530 | -0.003992 | -0.001296 | -0.009264 | -0.001925 | 0.008013 | 0.002723 | -0.005925 | 0.016900 | 0.000596 | 0.006456 | 0.013119 | -0.010585 | 0.005243 | 0.005652 | 0.011571 | -0.002932 | 0.000616 | -0.003693 | -0.000699 | -0.000295 | -0.000103 | -0.000539 | 1.000000 | 0.767874 | 0.697861 | 0.009286 |
| hardship_amount | 0.047746 | 0.054381 | 0.005015 | 0.010123 | 0.008410 | -0.019788 | 0.007138 | -0.004028 | -0.003760 | 0.012393 | 0.006226 | 0.005624 | 0.013961 | 0.012185 | 0.021302 | 0.027494 | 0.087807 | 0.133136 | 0.028830 | -0.015056 | -0.053573 | 0.002498 | -0.001594 | nan | 0.005248 | 0.008346 | 0.000403 | 0.000171 | 0.006370 | 0.009791 | 0.010989 | 0.014581 | 0.019597 | -0.009042 | 0.016134 | 0.012285 | 0.007648 | 0.011054 | 0.001918 | 0.021160 | -0.001659 | 0.012802 | 0.009354 | 0.015156 | 0.018833 | -0.011324 | 0.002218 | 0.000656 | 0.006389 | -0.001128 | -0.004679 | -0.008207 | -0.000935 | -0.003901 | -0.001933 | -0.010970 | -0.002183 | 0.005454 | 0.006726 | -0.001625 | 0.016970 | 0.001085 | 0.004364 | 0.013594 | -0.006294 | 0.003604 | 0.004798 | 0.018319 | 0.003691 | 0.005503 | 0.001330 | 0.004391 | 0.000035 | 0.001109 | 0.001915 | 0.767874 | 1.000000 | 0.734386 | 0.011908 |
| hardship_last_payment_amount | 0.038847 | 0.034055 | 0.004901 | 0.007360 | 0.008358 | -0.016608 | 0.005893 | -0.003604 | -0.004102 | 0.010295 | 0.005102 | 0.004560 | 0.011591 | 0.010638 | 0.014218 | 0.025387 | 0.070117 | 0.125324 | 0.020079 | -0.015116 | -0.048189 | 0.002887 | -0.001905 | nan | 0.002525 | 0.004642 | 0.000746 | 0.000226 | 0.004971 | 0.007828 | 0.008128 | 0.010353 | 0.014404 | -0.006879 | 0.012621 | 0.008848 | 0.006039 | 0.008576 | 0.001035 | 0.015062 | -0.001580 | 0.009615 | 0.007427 | 0.010676 | 0.014883 | -0.009746 | 0.001192 | -0.000283 | 0.005550 | 0.000792 | -0.003868 | -0.006873 | -0.001079 | -0.002558 | -0.001361 | -0.008189 | -0.001771 | 0.004967 | 0.005799 | -0.000959 | 0.014265 | 0.000792 | 0.004332 | 0.010647 | -0.006427 | 0.002190 | 0.004312 | 0.015349 | 0.000706 | 0.002424 | -0.000815 | 0.002439 | -0.000405 | -0.000022 | 0.000748 | 0.697861 | 0.734386 | 1.000000 | 0.009889 |
| settlement_amount | 0.059371 | 0.067767 | 0.003216 | 0.018055 | 0.006420 | -0.027076 | 0.016880 | -0.003586 | -0.004351 | 0.023260 | 0.001514 | 0.012458 | 0.022933 | 0.028617 | -0.052770 | 0.016648 | 0.064289 | 0.066643 | 0.467846 | -0.046265 | -0.126781 | -0.001217 | 0.000700 | nan | -0.009731 | -0.008555 | 0.002562 | -0.000426 | 0.004492 | 0.017482 | 0.003573 | 0.016482 | 0.018251 | -0.010224 | 0.007917 | 0.008998 | 0.014240 | 0.017302 | 0.007589 | 0.016942 | 0.002299 | 0.008140 | 0.005494 | 0.014876 | 0.033141 | -0.014245 | 0.001434 | 0.000243 | 0.006309 | 0.007149 | -0.017892 | -0.019152 | 0.007482 | -0.013932 | -0.000321 | -0.014196 | -0.003337 | 0.001420 | 0.016469 | 0.020314 | 0.013366 | -0.000787 | 0.000051 | 0.028470 | 0.000927 | 0.000849 | -0.000027 | 0.016445 | -0.010376 | -0.005114 | -0.009128 | -0.009129 | -0.000261 | -0.000917 | -0.006351 | 0.009286 | 0.011908 | 0.009889 | 1.000000 |
df_2.select_dtypes('object').head(3).style.set_properties(**{'background-color': 'black',
'color': 'lawngreen',
'border-color': 'white'})
| grade | sub_grade | emp_length | home_ownership | verification_status | issue_d | loan_status | pymnt_plan | purpose | title | earliest_cr_line | initial_list_status | last_pymnt_d | next_pymnt_d | last_credit_pull_d | application_type | verification_status_joint | sec_app_earliest_cr_line | hardship_flag | hardship_type | hardship_reason | hardship_status | hardship_start_date | hardship_end_date | payment_plan_start_date | hardship_loan_status | disbursement_method | debt_settlement_flag | debt_settlement_flag_date | settlement_status | settlement_date | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | C | C4 | 11 years | MORTGAGE | Not Verified | Dec-2015 | Fully Paid | n | debt_consolidation | Debt consolidation | Aug-2003 | w | Jan-2019 | Mar-2019 | Individual | N | Cash | N | |||||||||||||
| 1 | C | C1 | 11 years | MORTGAGE | Not Verified | Dec-2015 | Fully Paid | n | small_business | Business | Dec-1999 | w | Jun-2016 | Mar-2019 | Individual | N | Cash | N | |||||||||||||
| 2 | B | B4 | 11 years | MORTGAGE | Not Verified | Dec-2015 | Fully Paid | n | home_improvement | Aug-2000 | w | Jun-2017 | Mar-2019 | Joint App | Not Verified | N | Cash | N |
df_2.select_dtypes('object')['emp_length'].unique()
array(['11 years', '3 years', '4 years', '6 years', '1 year', '7 years',
'8 years', '5 years', '2 years', '9 years', '0 years', ''],
dtype=object)
mask_10 = df_2['emp_length'] == '10+ years'
df_2['emp_length'][mask_10]=df_2['emp_length'][mask_10].map({'10+ years':'11 years'})
df_2.select_dtypes('object')['emp_length'].unique()
array(['11 years', '3 years', '4 years', '6 years', '1 year', '7 years',
'8 years', '5 years', '2 years', '9 years', '0 years', ''],
dtype=object)
mask_0 = df_2['emp_length'] == '< 1 year'
df_2['emp_length'][mask_0]=df_2['emp_length'][mask_0].map({'< 1 year':'0 years'})
df_2.select_dtypes('object')['emp_length'].unique()
array(['11 years', '3 years', '4 years', '6 years', '1 year', '7 years',
'8 years', '5 years', '2 years', '9 years', '0 years', ''],
dtype=object)
#mask=(df_2['loan_status']=='Charged Off')
#df_2['loan_status_charged_off']=''
#df_2['loan_status_charged_off'][mask]='Charged Off'
#df_2['loan_status_charged_off'][~mask]=''
#df_2[['loan_status','loan_status_charged_off']]
theilu = pd.DataFrame(index=['loan_status'],columns=df_2.select_dtypes('object').drop(['loan_status'],axis=1).columns)
columns = df_2.select_dtypes('object').drop(['loan_status'],axis=1).columns
for m in list(theilu.index):
for j in range(0,len(columns)):
u = theil_u(df_2.select_dtypes('object')[m].tolist(),df_2.select_dtypes('object')[columns[j]].tolist())
theilu.loc[m,columns[j]] = u
theilu.fillna(value=np.nan,inplace=True)
temp = theilu.melt().sort_values(by='value',ascending=False)
temp.rename(columns={'variable':'variable_2','value':'Thiel U'},inplace=True)
temp.index.name = 'variable_1'
temp.reset_index(level=0,drop=False,inplace=True)
temp['variable_1']='loan_status'
temp.style.background_gradient(cmap='Reds')
| variable_1 | variable_2 | Thiel U | |
|---|---|---|---|
| 0 | loan_status | next_pymnt_d | 0.644694 |
| 1 | loan_status | last_pymnt_d | 0.602468 |
| 2 | loan_status | last_credit_pull_d | 0.278253 |
| 3 | loan_status | issue_d | 0.267395 |
| 4 | loan_status | title | 0.065845 |
| 5 | loan_status | initial_list_status | 0.033257 |
| 6 | loan_status | settlement_date | 0.031000 |
| 7 | loan_status | debt_settlement_flag_date | 0.030703 |
| 8 | loan_status | settlement_status | 0.030590 |
| 9 | loan_status | debt_settlement_flag | 0.030425 |
| 10 | loan_status | sub_grade | 0.028570 |
| 11 | loan_status | grade | 0.026454 |
| 12 | loan_status | disbursement_method | 0.019841 |
| 13 | loan_status | sec_app_earliest_cr_line | 0.018732 |
| 14 | loan_status | earliest_cr_line | 0.018138 |
| 15 | loan_status | application_type | 0.016498 |
| 16 | loan_status | verification_status_joint | 0.015232 |
| 17 | loan_status | verification_status | 0.007668 |
| 18 | loan_status | payment_plan_start_date | 0.004565 |
| 19 | loan_status | hardship_end_date | 0.004536 |
| 20 | loan_status | hardship_start_date | 0.004467 |
| 21 | loan_status | hardship_status | 0.004404 |
| 22 | loan_status | hardship_reason | 0.003484 |
| 23 | loan_status | hardship_loan_status | 0.003372 |
| 24 | loan_status | hardship_type | 0.003192 |
| 25 | loan_status | purpose | 0.003024 |
| 26 | loan_status | emp_length | 0.002125 |
| 27 | loan_status | home_ownership | 0.001983 |
| 28 | loan_status | hardship_flag | 0.001689 |
| 29 | loan_status | pymnt_plan | 0.001344 |
#Object_data['loan_status'][Object_data['loan_status']=='Charged Off']
#Object_data_2 = df_2.select_dtypes('object').drop(['loan_status'],axis=1)
#Object_data_2 = df_2.select_dtypes('object')
#Object_data_2['']
mask=(theilu[list(theilu.columns)]>0.002)
obj_data= df_2[theilu[mask].dropna(axis=1).columns]
## I will first remove the variable based on the information criteria and then remove the correlated variables
cramers_ = pd.DataFrame(index=list(obj_data.columns), columns=list(obj_data.columns))
#cramers_v(Object_data_2['grade'],Object_data_2['term'])
idx = list(cramers_.index)
col = list(cramers_.columns)
Correlation_ = {}
for m in idx:
for j in col:
if m != j:
u = cramers_v(obj_data[m],obj_data[j])
cramers_.loc[m,j] = u
if u>0.8:
print(u,m)
Correlation_[m,j]=u
#print(u)
cramers_.fillna(value=1,inplace=True)
#cramers_.style.background_gradient(cmap='Reds')
0.999993807189499 grade 0.999993807189499 sub_grade 0.9209969466485365 purpose 0.9209969466485366 title 0.9999982306341806 hardship_type 0.9999995576588386 hardship_type 0.9999942495496402 hardship_type 0.9999940283778121 hardship_type 0.9999942495496402 hardship_type 0.9999991153174816 hardship_type 0.9999982306341806 hardship_reason 0.9999995576588386 hardship_status 0.8089085144056763 hardship_status 0.9999942495496402 hardship_start_date 0.9999940283778121 hardship_end_date 0.8089085144056763 hardship_end_date 0.9999942495496402 payment_plan_start_date 0.9999991153174815 hardship_loan_status
mask_cram= np.triu(np.ones(cramers_.shape)).astype(np.bool)
#print(mask_cram)
mp.figure(figsize=(25,22))
sns.heatmap(cramers_, mask=mask_cram,annot=True, cmap="Reds")
mp.show()
(list(Correlation_.keys()))
[('grade', 'sub_grade'),
('sub_grade', 'grade'),
('purpose', 'title'),
('title', 'purpose'),
('hardship_type', 'hardship_reason'),
('hardship_type', 'hardship_status'),
('hardship_type', 'hardship_start_date'),
('hardship_type', 'hardship_end_date'),
('hardship_type', 'payment_plan_start_date'),
('hardship_type', 'hardship_loan_status'),
('hardship_reason', 'hardship_type'),
('hardship_status', 'hardship_type'),
('hardship_status', 'hardship_end_date'),
('hardship_start_date', 'hardship_type'),
('hardship_end_date', 'hardship_type'),
('hardship_end_date', 'hardship_status'),
('payment_plan_start_date', 'hardship_type'),
('hardship_loan_status', 'hardship_type')]
columns_drop = ['sub_grade','title','hardship_reason','hardship_start_date','hardship_end_date','payment_plan_start_date','hardship_loan_status']
obj_data.drop(columns_drop,axis=1,inplace=True)
obj_data.drop(['hardship_type'],axis=1,inplace=True)
obj_data.head(5).style.set_properties(**{'background-color': 'black',
'color': 'lawngreen',
'border-color': 'white'})
| grade | emp_length | verification_status | issue_d | purpose | earliest_cr_line | initial_list_status | last_pymnt_d | next_pymnt_d | last_credit_pull_d | application_type | verification_status_joint | sec_app_earliest_cr_line | hardship_status | disbursement_method | debt_settlement_flag | debt_settlement_flag_date | settlement_status | settlement_date | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | C | 11 years | Not Verified | Dec-2015 | debt_consolidation | Aug-2003 | w | Jan-2019 | Mar-2019 | Individual | Cash | N | |||||||
| 1 | C | 11 years | Not Verified | Dec-2015 | small_business | Dec-1999 | w | Jun-2016 | Mar-2019 | Individual | Cash | N | |||||||
| 2 | B | 11 years | Not Verified | Dec-2015 | home_improvement | Aug-2000 | w | Jun-2017 | Mar-2019 | Joint App | Not Verified | Cash | N | ||||||
| 3 | C | 11 years | Source Verified | Dec-2015 | debt_consolidation | Sep-2008 | w | Feb-2019 | Apr-2019 | Mar-2019 | Individual | Cash | N | ||||||
| 4 | F | 3 years | Source Verified | Dec-2015 | major_purchase | Jun-1998 | w | Jul-2016 | Mar-2018 | Individual | Cash | N |
fl_data =df_2.select_dtypes('float64')
obj_data.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 2260701 entries, 0 to 2260700 Data columns (total 19 columns): # Column Dtype --- ------ ----- 0 grade object 1 emp_length object 2 verification_status object 3 issue_d object 4 purpose object 5 earliest_cr_line object 6 initial_list_status object 7 last_pymnt_d object 8 next_pymnt_d object 9 last_credit_pull_d object 10 application_type object 11 verification_status_joint object 12 sec_app_earliest_cr_line object 13 hardship_status object 14 disbursement_method object 15 debt_settlement_flag object 16 debt_settlement_flag_date object 17 settlement_status object 18 settlement_date object dtypes: object(19) memory usage: 327.7+ MB
obj_data['issue_d']=obj_data['issue_d'].fillna('')
obj_data['last_pymnt_d']=obj_data['last_pymnt_d'].fillna('')
obj_data['next_pymnt_d']=obj_data['next_pymnt_d'].fillna('')
obj_data['last_credit_pull_d'] = obj_data['last_credit_pull_d'].fillna('')
obj_data.isnull().mean()
grade 0.0 emp_length 0.0 verification_status 0.0 issue_d 0.0 purpose 0.0 earliest_cr_line 0.0 initial_list_status 0.0 last_pymnt_d 0.0 next_pymnt_d 0.0 last_credit_pull_d 0.0 application_type 0.0 verification_status_joint 0.0 sec_app_earliest_cr_line 0.0 hardship_status 0.0 disbursement_method 0.0 debt_settlement_flag 0.0 debt_settlement_flag_date 0.0 settlement_status 0.0 settlement_date 0.0 dtype: float64
obj_data.nunique()
grade 8 emp_length 12 verification_status 4 issue_d 140 purpose 15 earliest_cr_line 755 initial_list_status 3 last_pymnt_d 137 next_pymnt_d 107 last_credit_pull_d 142 application_type 3 verification_status_joint 4 sec_app_earliest_cr_line 664 hardship_status 4 disbursement_method 3 debt_settlement_flag 3 debt_settlement_flag_date 84 settlement_status 4 settlement_date 91 dtype: int64
data_final=pd.concat([fl_data,obj_data],axis=1)
data_final.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 2260701 entries, 0 to 2260700 Data columns (total 98 columns): # Column Dtype --- ------ ----- 0 loan_amnt float64 1 int_rate float64 2 annual_inc float64 3 dti float64 4 delinq_2yrs float64 5 fico_range_low float64 6 inq_last_6mths float64 7 mths_since_last_delinq float64 8 mths_since_last_record float64 9 open_acc float64 10 pub_rec float64 11 revol_bal float64 12 revol_util float64 13 total_acc float64 14 out_prncp float64 15 total_pymnt float64 16 total_rec_int float64 17 total_rec_late_fee float64 18 recoveries float64 19 last_pymnt_amnt float64 20 last_fico_range_high float64 21 collections_12_mths_ex_med float64 22 mths_since_last_major_derog float64 23 annual_inc_joint float64 24 dti_joint float64 25 acc_now_delinq float64 26 tot_coll_amt float64 27 tot_cur_bal float64 28 open_acc_6m float64 29 open_act_il float64 30 open_il_12m float64 31 open_il_24m float64 32 mths_since_rcnt_il float64 33 total_bal_il float64 34 il_util float64 35 open_rv_12m float64 36 open_rv_24m float64 37 max_bal_bc float64 38 all_util float64 39 total_rev_hi_lim float64 40 inq_fi float64 41 total_cu_tl float64 42 inq_last_12m float64 43 acc_open_past_24mths float64 44 bc_open_to_buy float64 45 chargeoff_within_12_mths float64 46 delinq_amnt float64 47 mo_sin_old_il_acct float64 48 mo_sin_old_rev_tl_op float64 49 mo_sin_rcnt_rev_tl_op float64 50 mo_sin_rcnt_tl float64 51 mort_acc float64 52 mths_since_recent_bc float64 53 mths_since_recent_bc_dlq float64 54 mths_since_recent_inq float64 55 mths_since_recent_revol_delinq float64 56 num_accts_ever_120_pd float64 57 num_actv_bc_tl float64 58 num_bc_tl float64 59 num_il_tl float64 60 num_tl_120dpd_2m float64 61 num_tl_90g_dpd_24m float64 62 num_tl_op_past_12m float64 63 pct_tl_nvr_dlq float64 64 pub_rec_bankruptcies float64 65 tax_liens float64 66 total_bal_ex_mort float64 67 revol_bal_joint float64 68 sec_app_inq_last_6mths float64 69 sec_app_mort_acc float64 70 sec_app_open_act_il float64 71 sec_app_chargeoff_within_12_mths float64 72 sec_app_collections_12_mths_ex_med float64 73 sec_app_mths_since_last_major_derog float64 74 deferral_term float64 75 hardship_amount float64 76 hardship_last_payment_amount float64 77 settlement_amount float64 78 loan_status_binary float64 79 grade object 80 emp_length object 81 verification_status object 82 issue_d object 83 purpose object 84 earliest_cr_line object 85 initial_list_status object 86 last_pymnt_d object 87 next_pymnt_d object 88 last_credit_pull_d object 89 application_type object 90 verification_status_joint object 91 sec_app_earliest_cr_line object 92 hardship_status object 93 disbursement_method object 94 debt_settlement_flag object 95 debt_settlement_flag_date object 96 settlement_status object 97 settlement_date object dtypes: float64(79), object(19) memory usage: 1.7+ GB
data_final.to_csv('Data/Lending_Club_clean.csv')
#df_2['issue_d'].map(df_2.groupby('issue_d')['loan_status_binary'].mean())
#(df_2.groupby('issue_d')['loan_status_binary'].count()/df_2.groupby('issue_d')['loan_status_binary'].count().values.sum())
#Counter(list((df_2.groupby('issue_d')['loan_status'].count().apply(lambda x: x if x>200 else None).notnull().astype(int))))
#smooth = additive_smoothing(df_2,'issue_d','loan_status',2)
#smooth
# ### The above command means that there are 14 occurence of counts less than 200 of a particular category. Thus it is possible to trust the local mean. I will give a low weight to the local mean (additive_smoothing(df, by, on, m):)